Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word, printing, and VFP
Message
From
21/03/2000 09:53:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Word, printing, and VFP
Miscellaneous
Thread ID:
00348349
Message ID:
00348349
Views:
43
Hey all.

I have a situation which is really strange. I have instanced Word in a method with CREATEOBJECT() and then proceed to build a fairly complex 3 page document. At the end of the document assembly, I do an oWord.PrintOut() to print the sucker. Finally, oWord.Quit(0) and oWord=.NULL.. I never Activate or oWord.Visible=.T.

For security reasons, I cannot actually show Word to the user. The client does not want the documents modified or saved or manually manipulated in any way.

The problem is this: The document does not get handed off to the print queue unless I make word visible. The Quit method appears to be following too close to the PrintOut method is my guess.

I can resolve this problem by creating oWord at the application and not Quitting it until the application is quit, but that seems suboptimal in terms of resources.

Any way to A) Guarantee that the document is printed regardless? and B) Do it in a way that I can release Word without inserting some sort of wait state or use Visible? and C) Be able to tell that Word has finished sending the document to the Windows print queue?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Next
Reply
Map
View

Click here to load this message in the networking platform