>The biggest problem is how to get control back to the application to complete processing.
>
>However, I haven't been able to figure out how to attach a name to a document under automation either. The error message indicates that .Name is read-only. It seems like the name can only be changed using the dialog that appears when you try to save or to close the application. I'd really like to suppress that dialog entirely. In fact I saw a thread earlier that showed how to do that but I can't find it now...
To do the Automation, you need an object reference to the document. If you keep this object reference somewhere in your VFP program, I think you should be able to continue working with it, even after the user saves. However, if the user closes the document, the object reference would get lost.
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)