Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automation of Word document inserted into a general fied
Message
From
06/04/2000 12:36:57
 
 
To
06/04/2000 11:59:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00356259
Message ID:
00356365
Views:
24
>
Oscar,
>Think :
>oWord = CreatObject('Word.Application')
>As :
>oWord = thisform.myOleBoundControl
>
>You could createobject("Form") and add your oleboundcontrol to it. It doesn't need to be shown at all.
>Cetin

Thanks Cetin

I already tried, but somehow some commands works while others don't.

In my case:

When assigning variable oWord like this

OWord = CreateObject('Word.Application')

The next two lines work Ok:

oWord.selection.Bookmarks('Fecha').select

oWord.selection.insertafter('MyName')


If I assign a reference to the OLE control to the variable oWord

I receive the error 'Selection' is not an object.

However, if I remove the selection reference from both commands like this:

oword.Bookmarks('Asignacion').select

oWord.insertafter('MyName')

Only the first line works fine and the second creates the next error:
OLE 0x80020006 unknown COM state error code

What am I doing wrong?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform