I want to open a Word document without using OLE.
But I also want a macro to be executed.
Normally for opening a document and executing a macro MACRO you do :
WINWORD.EXE LETTER.DOC /MMACRO
Because I don't know the exact path of WINWORD.EXE, I want to use ShellExecute()
So I tried this code :
- Code: Select all Expand view
- ShellExecute(,"Open","LETTER.DOC","/MMACRO",,3)
The document is opened in Word, but the macro MACRO is not executed, although the 4th position is ment to add parameters.
What can I do to execute the macro in an automatic way ?
Thanks a lot in advance for any help.