Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BackgroundPrintStatus line in Word seeming to fail in VF
Message
 
To
15/06/2002 15:21:08
Victoria Mckee
Kansas City Life Insurance Co
Kansas City, Missouri, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00668934
Message ID:
00669101
Views:
18
>This secion of code has been working great under
>VFP6 after adding the BackgroundPrintingStatus line.
>I converted it to VFP7 last week and now the printer
>window say "Spooling" for minutes. I have another
>section that just prints a standard document which also
>stalls. I am using Word 2000 with both VFP6 & 7.
>
>lcFileName is defined as company name & incrementing number: "OAIC-0012.doc"
		oleApp.Documents.Open ("c:\foxprint\GAMMemo.doc")
		oleApp.ActiveDocument.MailMerge.Execute
		oleApp.ActiveDocument.PrintOut
		oleApp.ActiveDocument.SaveAs(lcFileName)
		oleApp.ActiveDocument.Close
		oleApp.ActiveDocument.Saved = .t.
		oleApp.ActiveDocument.Close
		do while oleApp.BackgroundPrintingStatus > 0
		   doevents()	
		enddo
Without testing, what happens if you move the loop up to before the first Close command? If the same thing happens, try turning off Background Printing with the command oleApp.Options.PrintBackground = .F.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform