>>This is wrong. You could do it with only VFP if you could embed it (that is if the host already exist on the system) in VFP. No need to open by dblclick and choose SaveAs. Word docs could be saved via OLEAutomation using word.basic or word.application (Office97). Since you have a reference to an OLEBoundControl (word object) on a form you could use object's PEM. No need to createobject(), object is there and have a reference to it.
>>
>>* Assuming you have an embedded word doc, and on a form it's olbWf (OLEBoundControl)
>>ThisForm.olbWf.object.saveas("cetins.doc")
>>
>>For a more detailed example see "Interacting with word using word.basic" in KB\FAQ section.
>>cetin
>
>Cetin,
>
>Before you declare an answer as wrong, first read the original question. There was no mention of any fomr having an OLEBoundControl. The question was simply how to get a word document out of a general field. In fact you CANNOT get anything out of a general field. You can only save a copy of it and then blank the general field out. General fields are one way things, you can put stuff in but you can't get it back out without using the server application.
>
>Please don't jump in with a declaration of this is wrong unless you know for sure it is.
Sory Jim,
Caught with my English. I got the original question as "is it possible to get a copy of word doc embedded w/o user intervention when word exist on system". I thought, creating a form without showing it, was a way.
use wtest
locate for oType = "Word doc"
oform = createobject("form")
with oForm
.addobject("olbW","Oleboundcontrol")
.height = 420
.width = 620
.olbW.top = 0
.olbW.left = 400
.olbW.height = 400
.olbW.width = 600
.olbW.controlsource = "wtest.oSelf"
.olbW.object.saveas("c:\temp\acopy.doc",)
.release
endwith
Cetin
Cetin