Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing Status in Word
Message
From
16/05/2002 09:36:22
 
 
To
15/05/2002 15:44:43
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00657111
Message ID:
00657373
Views:
25
>Hi,
>
>I am printing a Word Document from VFP 7 using these simple commands
>loWord=CreateObject("Word.Application")
>If Vartype(loWord)="O"
> loDoc=loWord.Documents.Open(tcWordDocFile)
> loDoc.PrintOut(.T.)
> loDoc.Close()
> loWord.Quit && << problem command here >>>
>Endif
>
>The problem is when I issue the quit command, Word will come up saying 'Quitting Word will cancel all your pending print jobs. Do you want to quit now?' I tried to give a timeout before the quit, but as the time would vary depending on the size of the document, it is not reliable.

Pass .F. rather than .T. to the PrintOut method so that you're not printing in the background.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform