Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Previewing in Word only
Message
From
12/07/2001 10:37:17
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00528482
Message ID:
00529711
Views:
15
>First of all, if you want this just to restrict users editing of the document after preview, make the DOC file created by Word read-only, than open it in Word again and preview.

This means we have to save a copy on disk. It'd like in VFP where all preview would go on disk. Too much management. :) I'd prefer another approach.

>If you wand to close word immediately after preview closed... Well, you than need to find a way HOW distinguish from VFP the states of the Word to see if it is in preview mode or it is just in document editing state. I don't know how. However, if preview cuses modal state in the OLE Automation, than returning control to VFP is a sign of finishing of the preview mode and you can close the document from VFP. If this cause no modal state, than you require to check Word state in a loop and see if Word is still in preview mode...

The way it is now, the control is immediately return to VFP after the preview has been initiated.

After Word has opened the document, this is what we have:
loWord.Visible=.T.
loWord.ActiveDocument.PrintPreview
I don't know if there would be such parameter we could pass in PrintPreview to do that.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform