Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automating Word - pesky printer dialog box pops up!
Message
From
01/06/2006 09:59:31
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, United States
 
 
To
01/06/2006 07:01:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Miscellaneous
Thread ID:
01126397
Message ID:
01126452
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform