Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Select Printer with Word Automation
Message
From
26/10/2001 04:30:55
 
 
To
25/10/2001 21:42:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00573413
Message ID:
00573543
Views:
30
This message has been marked as the solution to the initial question of the thread.
Hi!

Hej guys, this property also change the Windows system DEFAULT printer that cause often very unpredictable things and results, as well as Word dialog boxes (that hang up application) and sometimes even crashes.

Following command allow to change the printer in the Word without changing the system default printer:

oWord.WORDBASIC.FILEPRINTSETUP(cPrinterName,0,0,1)

Good luck!

>>You can change the active printer as follows;
>>
>>oWordApp.ActivePrinter = getprinter() && or you could use the Common Dialog control to return a selected printer.
>>
>>The ActivePrinter is a property of the Application object not the document object.
>>
>>Hope this helps.
>
>
>Thanks, this will help.
>
>I need to set oWordApp.ActivePrinter from data in a table. I'm assuming that I can just store the value returned by getprinter(), for instance "HP LaserJet 9000 PCL 6", and then pass this value at run time. This should work, right?
>
>Peter
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform