Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Selecting printer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
klav - 26 Jan 2006 20:04 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.