Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a Word Document and Closing Word

Status
Not open for further replies.

coolscan3

Programmer
Oct 23, 2001
40
GB
I am trying to Open Word, Print a Document and then Close Word Using the Following Code

Private Sub Command0_Click()
Dim w As Object


Set w = CreateObject("word.application")
w.Visible = True
w.Documents.Open "c:\mydoc.doc"
w.ACTIVEDOCUMENT.PrintOut
w.ACTIVEDOCUMENT.Close

w.Quit


The Problem is when Word Quits I Get a dialogue box saying

Word is Currently Printing. Quiting Word will cancel all pending print jobs. Do you want to quit Word

As anyone any solutions ?
 
That is just a message that Windows has started using with the new verions. If you open a document in Word itself and try to close right after you start a print job, you will get the same message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top