Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-03-2013, 12:08 AM
jdockstader jdockstader is offline From the command line, how do I run a Word macro? Windows 7 64bit From the command line, how do I run a Word macro? Office 2007
Novice
From the command line, how do I run a Word macro?
 
Join Date: Feb 2013
Posts: 4
jdockstader is on a distinguished road
Default From the command line, how do I run a Word macro?

As part of a workflow in a PDM system, I have to convert a Word file to PDF. I've written a macro that will save the PDFs and close Word. I can't put that macro in every users Normal.dotm file so I need to be able to load it from a shell command. I saved my macro, SaveAsPDF, in a Custom.dotm and I can put that in a shared location (during testing it's on my c: drive)

When I execute the command
"C:\Program Files (x86)\Microsoft Office\Office12\winword" /l"C:\Custom.dotm" /w %filename% /mSaveAsPDF


Word opens with the file and the macro is present but doesn't execute.

I've tried using /t instead of /l to load the macro containing template but it doesn't seem to work at all.
Reply With Quote
 

Tags
command line, macro vba word



Similar Threads
Thread Thread Starter Forum Replies Last Post
From the command line, how do I run a Word macro? Command line syntax for 2010 asearle Word 1 08-07-2012 05:42 AM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:44 AM.


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