Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP with MSWord
Message
De
21/03/1999 13:39:18
 
 
À
21/03/1999 05:35:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00200130
Message ID:
00200289
Vues:
11
>Hi Erik,
>
>I already sent a short reply, but now i have tried things out, and I just can't get it to work.
>
>after oWord=createobject("Word.Basic"), I use oWord.Run('mymacro'), but i always get error messges. I have tried a lot of variations, also
>oWord.Run(MacroName:='myMacro')
>
>but nothing will work. I have looked at the help file, but didn't get much wiser. Yes, the help file refers to application.run etc., so now I am feeeling somewhat lost, and don't know what else I can try.
>
>Rolf

If you instanciate word with CREATEOBJECT('Word.Basic') then you are committing yourself to the wordbasic language. Office97 and later are capable of using WordBasic, but are designed to take advantage of Visual Basic for Applications (VBA). The Run() method that I suggested to you is a VBA method, not a WordBasic method.

To use it, you need to instanciate word with CREATEOBJECT('Word.Application').

oWord = CREATEOBJECT('Word.Application')
oWord.Run('MyMacro')
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform