Board index » delphi » ActivePrinter setting Windows Default printer

ActivePrinter setting Windows Default printer

I'm using a TWordApplication object to manipulate MS word...opening,
changing, printing, and closing them. I use ActivePrinter to set the printer
for MS Word to print the document to. I have recently discovered that this
activity always causes MS Word to change the Windows default printer to the
printer that I print the document to. Is there a way to use TWordApplication
to tell MS Word to print a document without changing the Windows default
printer setting for the workstation? Thanks.
 

Re:ActivePrinter setting Windows Default printer


You should store the default printer in a temporary var before affecting the
printer you want,
then after printing , you restore the default printer.

"roger mcallister" <ro...@avimark.net> a crit dans le message news:
3cdaeb16_1@dnews...

Quote
> I'm using a TWordApplication object to manipulate MS word...opening,
> changing, printing, and closing them. I use ActivePrinter to set the
printer
> for MS Word to print the document to. I have recently discovered that this
> activity always causes MS Word to change the Windows default printer to
the
> printer that I print the document to. Is there a way to use
TWordApplication
> to tell MS Word to print a document without changing the Windows default
> printer setting for the workstation? Thanks.

Other Threads