Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP with MSWord
Message
From
21/03/1999 13:39:18
 
 
To
21/03/1999 05:35:46
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00200130
Message ID:
00200289
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform