Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word automation, visible = .T. after printout(0)
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word automation, visible = .T. after printout(0)
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:
01042316
Vues:
72
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)
Luc Nadeau
lnadeau@neova.ca

"the theory, it is when all is known and that nothing works. The practice, it is when all works and that nobody knows why." - Albert Einstein (Nobel of physique 1921)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform