Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print Word Docs (Tamar? Della?)
Message
From
13/03/2002 07:23:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/03/2002 07:06:45
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00631971
Message ID:
00631973
Views:
26
>Let me try this again (didn't get a good answer):
>I need to batch print Word Docs nad need to avoid Words question"Do you want to save this document?
>
>here is what I do but that keeps asking:
>
>	SCAN
>		lcFormName = ALLTRIM(cc1.fname)	
>		IF NOT EMPTY(lcFormName ) AND FILE(lcFormName )
>		oWord=CREATEOBJECT("Word.Application")
>		oWord.VISIBLE=.F.
>		oWord.DisplayAlerts=.F.  && Dont' ask , but it does anyway!!!
>		oWord.DOcuments.Open(lcFormName )
>		oWord.ActiveDocument.PrintOut(.t.)
>		oWOrd.Quit()
>		oword=""
>		ENDIF
>	
>	ENDSCAN
>
>
>
>Any Ideas? I have to do a demo to the State Treasurer tomorrow and would like to avoid this snafu.
>
>
>Thanks

Till Tamar and Della kicks in :

-Save obj.ref. to a property say thisform.oWord
-Have a timer with say interval 2000
In its timer event :
if thisform.oWord.BackGroundPrintingStatus = 0
thisform.oWord.quit(0)
thisform.oWord = .null.
this.Enabled = .f.
endif

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform