|
-
Jul 12th, 2000, 03:19 PM
#1
Thread Starter
New Member
I am able to open and print the document, but when I try to close the Word app, I get the message that it is still printing.... How do I have it wait until the printing is done to close?
This is my code, any suggestions will be greatly appreciated.
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = False
WordApp.Documents.Open (MyDocument)
WordApp.ActiveDocument.Printout
WordApp.ActiveDocument.Close
WordApp.quit
Set WordApp = Nothing
Thank you for your help.
-
Jul 12th, 2000, 05:36 PM
#2
Fanatic Member
Ran into that before. We used a message box that said to click ok whenever the document was done printing.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Jul 12th, 2000, 06:03 PM
#3
Hyperactive Member
The first option on the "PrintOut" command is Background. This indicates if the macro will continue while Word prints it out and is defaulted to TRUE.
If you were to do :
Code:
WordApp.ActiveDocument.Printout FALSE
I believe with this your code will not even attempt to execute the next line until printing has finished.
-
Jul 13th, 2000, 06:45 AM
#4
Thread Starter
New Member
Thank you very much for your help!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|