Hi Trish,
You could do with a lengthy operation. You extract the contents to a doc file first. Copy one record to another table, open fpt lowlevel, strip first 599 bytes (header info) and name it with a .doc extension. When editing done get data back with "append general".
Otherwise you have to use an oleboundcontrol. In any case, in fact you're using the word object.
A general field is another type of binary memo field. VFP knows it would be opened with a server app. Other than that it's same as another binary memo field.
I tend to save "general" as external files and in table keep their name&path. This has the advantage of preventing fpt bloating if they're edited frequently. OTOH has the disadvantage of having numerous files in a directory.
Cetin
>I understand how to access the general field. Do you HAVE to use an OLEBOUNDCONTROL? If so, I can't seem to close word when I'm done.
>
>Can I just use a WORD OBJECT and access the general field?
>
>Trish
>
>>>Using OLE commands from VFP to "control" Word is no problem. I have an application that uses documents stored in a general field of a VFP table. I have no problem initiating an edi session with Word for the document, but at times, I would like to reference the Word application object.
>>>
>>>Is there any way to take the document stored in a general field and be able to control Word as though full OLE automation was being used? If this is not possible, is there a way to take the document stored in the general field and move it to a temporary ".DOC" file?
>>
>>
Al,
>>It doesn't matter if you instantiate word with createobject or it's an object bound to a general field.
>>
>>with thisform.OLEWord.Object.Application
>>*.....
>>endwith
>>
>>
CREATE cursor wtest (wf g)
>>APPEND blank
>>APPEND general wf from ("c:\my documents\test.doc")
>>oform = createobject("form")
>>WITH oform
>> .addobject("olbW","Oleboundcontrol")
>> .height = 420
>> .width = 620
>> WITH .olbW
>> .top = 10
>> .left = 10
>> .height = 400
>> .width = 600
>> .controlsource = "wtest.wf"
>> #DEFINE wdSeparateByTabs 1
>> #DEFINE wdTableFormatColorful1 8
>> #DEFINE wdSaveChanges -1
>> #DEFINE wdCollapseEnd 0
>> SELECT first_name, last_name ;
>> from (home()+"samples\data\employee") ;
>> into cursor myCursor
>> Application.datatoclip("myCursor",_tally, 3)
>> WITH .object
>> .Content.select
>> WITH .Application.Selection
>> .Text = "Hello from VFP."+chr(13)
>> .Collapse(wdCollapseEnd)
>> .Text = _cliptext
>> .ConvertToTable(wdSeparateByTabs,,,, ;
>> wdTableFormatColorful1,,,,,,,.f.,,.f.)
>> ENDWITH
>> .saveas("c:\temp\savedfromgen.doc")
>> .close(wdSaveChanges)
>> ENDWITH
>> * .visible = .t.
>> ENDWITH
>> * .Show
>>ENDWITH
>>*READ EVENTS
Cetin