Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word, printing, and VFP
Message
De
21/03/2000 12:09:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00348349
Message ID:
00348452
Vues:
22
Hmmmm....I'll have to try that. I didn't want to try that without some confirmation that it would work (complex app)...thanks, Jeff.

PS: Be nice if they put the freaking defaults in the Word2000 VBA documentation, wouldn't it?


>>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,
>
>Have you looked at the background par that you can use with printout.
>
>oxx=createobject("word.application")
>oxx.visible=.f.
>oxx.Documents.Add
>oxx.ActiveDocument.PrintOut(.f.)
>oxx.quit
>release oxx
>
>Works for me. The default is true and from the way I read the help file true allows macro to continue to run whilw false should wait until complete.
>
>HTH
>Jeff
------------------------------------------------
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform