Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word and Printing

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
0
0
PT
Hi,

In my VB application I´m priting a document (report) to a default printer that I specify in the application (so, the default printer defined in control panel is not important).

However, if I try to print a Word Documend (created dinamically in vb) to a default printer defined im my vb application the word will ignore it, and use the default printer defined in control panel This is logic, because Word uses the default printer of the control panel and not that defined inside VB.

The question is: How can I say to Word to use a specific printer? Is there any property or method inside Word Object Model?

Thank you :)
 
Application.ActivePrinter = "\\QTHVRNT5\3-01 on NE02:"
ActiveDocument.PrintOut

I have just tested the above code when "\\QTHVRNT5\3-01 on NE02:" was not the default or active printer and it worked fine?

 
I'm trying to do the same but in Excel, and it doesn't recognize the Application object. Any idea what I'm not initializing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top