How to import a macro file (previously exported as .bas file) to Microsoft Word using command line?
Posted
by Nam Gi VU
on Stack Overflow
See other posts from Stack Overflow
or by Nam Gi VU
Published on 2010-04-26T08:01:30Z
Indexed on
2010/04/26
8:03 UTC
Read the original article
Hit count: 319
msword
I'm writing a command-line program that has a step in which I need to replace text in a Word file. The replacing task is accomplished using Word macro.
What I need to do now is to call this macro from command-line. At the moment we can do this by using the -mMacroName parameter of 'winword.exe', i.e. \winword.exe -mMacroName. But this need the macro to be already available as a global macro.
Since I need to run the program on another computer, I need to import the above replacing macro programatically... and I don't know how to do this.
Please help.
© Stack Overflow or respective owner