Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating Word - pesky printer dialog box pops up!
Message
De
01/06/2006 09:59:31
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, États-Unis
 
 
À
01/06/2006 07:01:14
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Divers
Thread ID:
01126397
Message ID:
01126452
Vues:
13
I had a similar problem the code below seemed to solve my problem on a wide range of different machines.
lPrinting = IIF(.oWord.BackGroundPrintingStatus = 1,.T.,.F.)
DO WHILE(lPrinting)
*	WAIT WINDOW "Waiting for Word to Complete Printing..." NOWAIT NOCLEAR
	INKEY(THIS.nWordCompletePrintPause,"H")
	lPrinting = IIF(.oWord.BackGroundPrintingStatus = 1,.T.,.F.)
ENDDO
Hope this helps.

Scott



>That's great and it is now working properly. I had thought about merging it to a file before, but your method of doing so is more elegant than that which I was going to implement.
>
>One odd thing though, it only seemed to print when I had a manual suspension in place (eg. a debug stop on that line - this however has also been fixed by putting:
>
> WAIT '' TIMEOUT 1
>
>immediately after the oWord.Printout() line. Not sure why, but it's consistent, so we're happy!
>
>Many thanks for your help,
>
>JC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform