Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening word document embedded in a general field
Message
From
03/01/2003 19:25:02
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00737898
Message ID:
00737928
Views:
30
>I have an embedded (not linked) Word document in a general field. How can I use “code” to open the embedded word document in MSWord? Can I use “DoVerb”?
>Appreciate suggestions and sample code.

You can't open the embedded document in Word since it doesn't exist as a Word document on disk. There may be a way to restore the general field as a Word document, which you can then open.

Otherwise, you need to use the in-place editor (and I think you said elsewhere that might be messing up your formatting). So, for example,
CREATE TABLE MyGeneral (G1 G)
APPEND BLANK
APPEND GENERAL G1 FROM (GETFILE('DOC'))
MODIFY GENERAL G1
When you click anywhere on the general field, you get the OLE editor up. Does that not have the full features you need?

Another alternative, depending on how much control you have over the data, is to store the Word doc in a memo field, instead (FILETOSTR() for example). Then, you can STRTOFILE it out to a DOC file on disk and use GetObject() to open the document in Word.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform