AndrewMozley
Programmer
I am running Word 2003. I have a DOS application from which I wish to open up a text file which I have created in Word.
If I key in :
winword.exe myfile.txt
. . . that opens up the text file in Word and I can edit, save or print it &c
I would however like to set the margins and the font size, and to that end I have defined a template, mytemplate.dot with a macro, mymacro.
If I then key in :
winword.exe /tmytemplate /mmymacro
. . . this does indeed open up a blank document with the appropriate margins, and I can see that the macro is available during the session.
If however I key in :
winword.exe myfile.txt /tmytemplate /mmymacro
. . . this certainly opens myfile.txt, but it is not using mytemplate, and so cannot apply the macro. Altering the sequence of parameters makes no difference.
The only way that I can get the macro to run appears to be if I put it into the normal.dot template, and then key in :
winword.exe /mmymacro
However I would prefer not to have to modify the normal.dot template. Is there a way that I can open a text file from the command prompt, and make available the macros from my own template, then call that macro so that the document appears on the screen as required?
Thanks. Andrew Mozley
If I key in :
winword.exe myfile.txt
. . . that opens up the text file in Word and I can edit, save or print it &c
I would however like to set the margins and the font size, and to that end I have defined a template, mytemplate.dot with a macro, mymacro.
If I then key in :
winword.exe /tmytemplate /mmymacro
. . . this does indeed open up a blank document with the appropriate margins, and I can see that the macro is available during the session.
If however I key in :
winword.exe myfile.txt /tmytemplate /mmymacro
. . . this certainly opens myfile.txt, but it is not using mytemplate, and so cannot apply the macro. Altering the sequence of parameters makes no difference.
The only way that I can get the macro to run appears to be if I put it into the normal.dot template, and then key in :
winword.exe /mmymacro
However I would prefer not to have to modify the normal.dot template. Is there a way that I can open a text file from the command prompt, and make available the macros from my own template, then call that macro so that the document appears on the screen as required?
Thanks. Andrew Mozley