Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2018, 07:10 AM
Fesazu Fesazu is offline start a macro with command Line startup switches Windows 7 32bit start a macro with command Line startup switches Office 2010 64bit
Novice
start a macro with command Line startup switches
 
Join Date: Feb 2018
Posts: 2
Fesazu is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 02-06-2018, 07:14 AM
Charles Kenyon Charles Kenyon is offline start a macro with command Line startup switches Windows 10 start a macro with command Line startup switches Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #3  
Old 02-06-2018, 01:01 PM
macropod's Avatar
macropod macropod is offline start a macro with command Line startup switches Windows 7 64bit start a macro with command Line startup switches Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #4  
Old 02-08-2018, 12:15 AM
Fesazu Fesazu is offline start a macro with command Line startup switches Windows 7 32bit start a macro with command Line startup switches Office 2010 64bit
Novice
start a macro with command Line startup switches
 
Join Date: Feb 2018
Posts: 2
Fesazu is on a distinguished road
Default

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



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
start a macro with command Line startup switches 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:19 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