Thread: [Solved] Command line syntax for 2010
View Single Post
 
Old 08-07-2012, 02:27 AM
asearle asearle is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default Command line syntax for 2010

Hi everyone,

We need to get Word to open a document, apply a template and run a macro and so far we seem to be having problems with the syntax.

We have tried the following ...

"C:\Programmes\WINWORD.EXE" /t"c:\templates\start.dotm"

... and a blank document opens successfully with the template.

But if we add a document ...

"C:\Programmes\WINWORD.EXE" "c:\docs\instructions.docx" /t"c:\templates\start.dotm"

... the document "instuctions.docx" opens fine but the template is not applied.

Finally we will need to call up a VBA-Macro ...

"C:\Programmes\WINWORD.EXE" "c:\docs\instructions.docx" /t"c:\templates\start.dotm" /m"Start.Module1.Start"

... but of course we can only do that when the other syntax is working.

Maybe someone out there can tell me where we are going wrong? Maybe you have an example of a valied command line for applying the template and starting the macro (which is in that template).

Many thanks for any tips that you can give.

Yours,
Alan
Reply With Quote