Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation of Word document inserted into a general fied
Message
De
06/04/2000 13:02:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/04/2000 12:36:57
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00356259
Message ID:
00356374
Vues:
17
>>
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?


Oscar,
For a sample code check "Automating Word" dated Aril 1st,2000.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform