#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
We sorted one thing out: /t"c:\templates\start.dotm" ... needed to be ... /l"c:\templates\start.dotm" (that's an 'L') and there should be no gaps between the switch and the text. Inverted commas are optional.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Invoking a command line from inside Word | bolpom | Word | 1 | 03-16-2011 03:03 AM |
Command Line Argument | xJediDadx | Outlook | 1 | 02-21-2011 03:47 PM |
Command Line Switches | Ringmaster | Office | 0 | 08-10-2010 06:27 AM |
Outlook 2003 - IMAP + Exchange. Set Default via Command-Line? | Petrucci914 | Outlook | 1 | 08-11-2009 07:47 AM |
Syntax help needed | blazzercat | Excel | 3 | 07-09-2009 02:15 PM |