>>I am having difficulties with OLE automation and MS Word.
>>
>>I know that in order to access any of the Word functions you have to create the OLE object as Word.Basic and not Word.Document.6. However how do you force the type to be Word.Basic on already existing objects?
>>
>>For example, I did the following:
>>
>>APPEND GENERAL worddoc FROM junk.doc CLASS "Word.Basic"
>>oForm = CREATEOBJ( "FORM" )
>>oForm.ADDOBJECT( "OLEWord", "OLEBOUNDCONTROL" )
>>oForm.OLEWord.ControlSource = "DATABASE.worddoc"
>>
>>I've tried the append with and w/out the quotes. Apparently the system cannot open a document as type word.basic, however I don't know how you can "FileOpen" from a database file w/out having to create a temp file and reappend the file upon completion of the task
>>
>You are mixing metaphors here if you will. OLE bound control is one thing and OLE automation is another. If all you want to do is print, you don't need the OLE bound control at all.
>
>oform=createobj('word.basic')
>
>then open the file and then print it. See OLE automation examples for word at
www.microsoft.com/oledev/oleautoI want to use OLE Automation to manipulate data that is embedded in a database. The only way I know to access data in a database is to use OLEBoundControl. I do not want to copy the field to a file and make changes and delete it (it's not 'embedded then and might as well just use a memo field. what would be the point of the General field type? am I completely missing something here?)
In any case, I found in the Word documentation that I can access the WordBasic object of an embedded document by accessing oForm.oWord.Application.WordBasic
This works unfortunately the embedded data doesn't seem to go with it.
I don't see any examples at
www.microsoft.com/oledev/oleauto. Looks like they might have changed some things around recently or I just plain missed it.