Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent Save in Word?
Message
From
26/02/2007 17:10:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01198988
Message ID:
01198992
Views:
25
>I have developed a Word automation process that has been running for several years. It (1) opens a template, (2) copies the text, (3)creates a new blank document, (4) pastes the copied text, (5) closes the template, (6) merges data, (7) calculates the number of copies needed, (8) prints them and (9) closes Word without saving the document. This is all invisible to the user.
>
>Now the client needs the ability to occasionally edit one of the documents so the automation process needs to be interrupted prior to step 7--and then ideally resumed and completed. I can use oWord.visible= .t. and oWord.Activate() to allow them to edit, but is there a way to get control back after the editing so I can continue the automated process?
>
>The natural tendency is for the user to print the document manually and then close Word. If they do that, I've lost the refrence and the printing can't take place. I'd also prefer that the document not be saved, or at least that I be able to control the name so that they don't overwrite the template. Any suggestions?

How about saving it to a temporary file? Filename created with sys(2015) or something similar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform