Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word automation, visible = .T. after printout(0)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01042316
Message ID:
01042442
Vues:
20
Hi Luc,

In test i Word 2003 with your code I see Word flashing during printing. Closing the document after printing seems to keep Word invisible.
	loWord.Documents.Open(lcDocument,,1)
	loWord.Printout(0)
	loWord.ActiveDocument.Close(0)
>I'm currently using Word automation to print barcoded document. When trying to print the subsequent copies, Word gets visible.
>
>I think I narrowed it down to the Document.Open() but I don't see why Word become visible after the second loop.
>
>In this example I reopen the same document many time, I have also tried re-using one instance of the document and got the same result.
>
>Any idea or workaround are welcome.
>
>Sample code to reproduce :
>
>
>lcDocument = GETFILE()
>
>loWord	= CREATEOBJECT([Word.Application])
>
>FOR lni=1 TO 3
> loWord.Documents.Open(lcDocument,,1)
> loWord.Printout(0)
>ENDFOR
>
>loWord.Quit(0)
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform