#1
|
|||
|
|||
start a macro with command Line startup switches
Hello, this is my first post on this site so hopefully I dont miss a thing. Also english is not my first language so I hope u still manage to understand me. My problem: I plan to use a modified startup method frequently, so I created a shortcut on the Windows desktop like this: U:\test\test.docm /mmacroname but somehow it does not Work as planned. :-( It does open the File but it does not execute the macro does anyone know what I did wrong? best regards Fesazu |
#2
|
|||
|
|||
I haven't used that switch in years (since Word 97, I think). I do not know if it works with macros stored in locations other than the normal template.
If it is always with the same template, consider naming your macro AutoNew and using a shortcut to your template. |
#3
|
||||
|
||||
Your shortcut isn't a valid Word command line - for starters, it's missing the Word.exe reference. If anything, it would have to look like:
word.exe /tU:\test\test.docm /mmacroname or: word.exe /fU:\test\test.docm /mmacroname If that doesn't work, consider callong your macro from a Document_Open macro or an AutoOpen macro, or changing your macro's name to one of those (as appropriate).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Hey,
thanks for your Help, I still can't do it with a switch i already tried it with the winword.exe but then it does open a new file and not my already existing file. But found another work around, I found an VB-script that I could modify to work as I want it to be. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
load word addin on start up from location other then startup | jed | Word VBA | 0 | 07-23-2015 12:30 PM |
Outlook 'Start Page' Command Button | Wobble | Outlook | 0 | 03-31-2015 04:49 AM |
Calling a macro in powerpoint from command line | SeattleITguy | PowerPoint | 4 | 11-26-2014 01:41 AM |
From the command line, how do I run a Word macro? | jdockstader | Word | 7 | 02-04-2013 06:09 AM |
Command Line Switches | Ringmaster | Office | 0 | 08-10-2010 06:27 AM |