I'm trying to select a specific printer only for the Word session I'm using
and leave the default printer for all other applications alone.
What I'm doing is when the user clicks on the print button of my custom
toolbar in Word, I utilize the "activeprinter=printerB" command, print the
document and then immediately change it back using the
"activeprinter=printerA" command again to set it back to what it was before
printing the document.
What's happening is that even though I'm changing the printer back to
"printerA" immediately after printing the document, if I leave that session
of Word open and open another application, say Excel, the printer for that
application is set to PrinterB, instead of PrinterA.
What is the best way of handling something like this?
Dave Lett - 26 Jan 2006 20:17 GMT
Hi Klav,
I can't replicate your problem with my test routine:
Dim sActivePrinter As String
sActivePrinter = ActivePrinter
ActivePrinter = "Canon iR2200-3300 PCL6 on NE03:"
ActivePrinter = sActivePrinter
Can you share the relevant code?
Dave
> I'm trying to select a specific printer only for the Word session I'm using
> and leave the default printer for all other applications alone.
[quoted text clipped - 11 lines]
>
> What is the best way of handling something like this?
Jonathan West - 26 Jan 2006 20:18 GMT
> I'm trying to select a specific printer only for the Word session I'm
> using
[quoted text clipped - 14 lines]
>
> What is the best way of handling something like this?
Changing the selected (current) printer in Word without changing the system
default printer
http://www.word.mvps.org/FAQs/MacrosVBA/ChangeCurPrinter.htm

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
klav - 26 Jan 2006 21:16 GMT
THANK YOU.....It works beautifully!
> > I'm trying to select a specific printer only for the Word session I'm
> > using
[quoted text clipped - 18 lines]
> default printer
> http://www.word.mvps.org/FAQs/MacrosVBA/ChangeCurPrinter.htm