Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Word landscape printing issue

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3032
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Word landscape printing issue
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Word landscape printing issue - 5/17/2005 4:41:32 AM   
  rflowers

 

Posts: 2
Score: 0
Joined: 5/16/2005
From: USA
Status: offline
Hi,

Can someone tell me why this script will not change to landscape when it prints?

- - - - - - - - - - - - - - - -
Const wdDoNotSaveChanges = 0

sFolder = "C:\iEngine\Control\"

Set oArg = WScript.Arguments
sDocument = oArg.Item(0)

sDocument = sFolder + sDocument

With CreateObject("Word.Application")

' to hide Word, set .Visible to False
.Visible = True

' open document & prep to print
.Documents.Open(sDocument)
.Options.PrintBackground = False

.ActiveDocument.PageSetup.Orientation = wdOrientLandscape
.ActiveDocument.PrintOut

' quit without saving any changes
.Application.Quit wdDoNotSaveChanges

End With
- - - - - - - - - - - - - - - - - - - -

Thanks,
Rich (newbie)
 
 
Post #: 1
 
 Re: Word landscape printing issue - 5/17/2005 6:21:41 AM   
  rflowers

 

Posts: 2
Score: 0
Joined: 5/16/2005
From: USA
Status: offline
Figured it out...

I forgot to define constant wdOrientLandscape as 1

(in reply to rflowers)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Word landscape printing issue Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts