Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing with Word
Message
From
24/01/2000 13:25:55
 
 
To
21/01/2000 16:41:52
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00321120
Message ID:
00321735
Views:
20
>you can make your call print call Synchronous by disabling background printing in Word. In Word 2000, this is done by:
>
>oWord.Options.PrintBackGround = .F.
>
>In earlier versions, the syntax is different, but I don't have access to them now. If you need it, I can send you some sample code later, or you can just search the VBA help for Background Printing.

Thanks!

Since I'm not using Word 2000, I began searching for the PrintBackGround option and I found the BackGroundPrintingStatus property, so I changed my code to the following and everything seems to work ok so far!
oAutomation = CREATEOBJECT("Word.Application")
oAutomation.Documents.Open(cNomFichier)
oAutomation.PrintOut
DO WHILE oAutomation.BackGroundPrintingStatus > 0
    DOEVENTS()
ENDDO
oAutomation.Quit
RELEASE oAutomation
Thanks again!
Sylvain Demers
Previous
Reply
Map
View

Click here to load this message in the networking platform