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 / October 2006

Tip: Looking for answers? Try searching our database.

Word automation print, hide error messages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonas Pedersen - 30 Oct 2006 12:23 GMT
When printing a word document through ole automation, I get a problem when a
user can't access the printer.
My aaplication uses the document.PrintOut method.
I have tried to set application.DisplayAlerts = FALSE, but the error message
still occurs, and the word application becomes visible.
What I would like was just the printout method to return FALSE and continue
my application.

Please help

Jonas
Jonathan West - 30 Oct 2006 14:31 GMT
> When printing a word document through ole automation, I get a problem when
> a user can't access the printer.
[quoted text clipped - 3 lines]
> What I would like was just the printout method to return FALSE and
> continue my application.

Hi Jonas

You can use this code to see which printers are available

Getting names of available printers
http://www.word.mvps.org/FAQs/MacrosVBA/AvailablePrinters.htm

Set the ActivePrinter to one of those, and you should normally be OK

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


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.