Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WordBasic Object Commands

Posted on 1997-04-30
4
Medium Priority
?
310 Views
Last Modified: 2012-06-21
I have an object declared as a Word.Basic type.  I send text from my VB app to it and need to print it.  Before I print it, however I need to change the printer orientation to Landscape.  How do I do this?
(ie, if my object name is WordLanguage, I know that the executing WordLanguage.InsertPageBreak inserts a page break, and WordLanguage.Font "Courier" sets the font type to Courier, but what property do i have to access to set (or return) the printer orientation?)
0
Comment
Question by:Loiosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:tward
ID: 1425859
Try:

 WordLanguage.FilePageSetup.Orientation=0 ' Portrait
 WordLanguage.FilePageSetup.Orientation=1 ' Landscape

You can also try:

 WordLanguage.TogglePortrait  

from what I have read TogglePortrait will toggle between Landscape and Portrait...

Hope this helps.
0
 

Author Comment

by:Loiosh
ID: 1425860
I hate to say it, but it doesn't work.  When I try WordLanguage.FilePageSetup.Orientation = 1, I get a run-time error 424 (object required) and while WordLanguage.TogglePortrait , does cause it to change to from one mode to the other -- that doesn't help me if the printer was already in Landscape mode (there doesn't seem to be a way to check the printers original orientation.)
0
 
LVL 7

Accepted Solution

by:
tward earned 100 total points
ID: 1425861
The only way to change to orientation then would be to set it up as a macro and then run the macro from visual basic.
0
 

Author Comment

by:Loiosh
ID: 1425862
Okay -- thanks for the help -- I guess I will try that
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question