Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2012, 02:27 AM
asearle asearle is offline Command line syntax for 2010 Windows 7 64bit Command line syntax for 2010 Office 2010 64bit
Novice
Command line syntax for 2010
 
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
  #2  
Old 08-07-2012, 05:42 AM
asearle asearle is offline Command line syntax for 2010 Windows 7 64bit Command line syntax for 2010 Office 2010 64bit
Novice
Command line syntax for 2010
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default

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.
Reply With Quote
Reply

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
Command line syntax for 2010 Outlook 2003 - IMAP + Exchange. Set Default via Command-Line? Petrucci914 Outlook 1 08-11-2009 07:47 AM
Command line syntax for 2010 Syntax help needed blazzercat Excel 3 07-09-2009 02:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft