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.

Save selected printer with document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cowtoon - 23 Jan 2006 16:35 GMT
I'd like my document to remember which printer it last used.  Is this done
with a macro or is there some other way to do this.

I'd appreciate your thoughts.  Thanks.
Helmut Weber - 24 Jan 2006 13:36 GMT
Hi,

> I'd like my document to remember which printer it last used.  Is this done
> with a macro or is there some other way to do this.

You'll need a macro, IMHO.
You may intercept the print commands,
see:
http://word.mvps.org/faqs/macrosvba/InterceptSavePrint.htm

or use an application beforeprint event
see:
http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm

Then you got to decide, where to store the printer name,
e.g. in a document variable, or in a custom document property.
To get the printer name: MsgBox Application.ActivePrinter

To store the printer name successfully, you might
have to set set document's saved property to false,
store the printer name, and save to doc.

And there might be more things to pay attention to.

--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
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.