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.comICQ #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.