Jump to content
Macro Express Forums

How to activate a macro in the library from outside.


Recommended Posts

As explained in the book "MEX3 Explained" on Page 106 the correct synthax/path to activate a macro from the library is


"C:\Program Files\Macro Express3\MeProc.exe"/A


You place the name of the macro directly (without Space) after the A. I´m not so sure about the quotes. I tried out with and without them. I get an "Could not open File"- Error always. (I made a hyperlink in MS Word and put in the path as the target.)


By the way, why gets my path manipulated by 20%strings etc.


Does anyone has an idea?


Thank you



Link to comment
Share on other sites

I have a macro named "Scratch Pad" and this is the command I would use:


"C:\Program Files\Macro Express3\meproc.exe" /AScratch Pad


Since the path to ME has spaces you need to wrap it in quotes.


%20? Link in Word? This sounds like you're trying to launch it from a hypertext link in a web page. Usually when I see %20 is when people use spaces in names or paths on the Internet. The space is an illegal character so systems substitute %20. For instance if I post a file with a space in the name your browser will display a %20 in the path instead. Start by typing your command in to the run line above the start menu. Or use the Win+R keyboard shortcut if you have Vista which removed it.

Link to comment
Share on other sites

Hi Cory,


i am very glad you are here :rolleyes:



I have this tiny macro called "Google" so i put in (as a target in the hyperlink)


„C:\Programme\Macro Express3\MeProc.exe“/AGoogle (Programme is German for Program Files)


When clicking on the link i got the error message. Checking the path in the link i see:




So C:\ has become C:/ and i have the %20 added. ?!?


This works also not in the run window, although i get a different message: "C:\Programme\Macro could not be found.


This looks like it has something to to do with space. But what exactly?


Do your macros run from Word?


I would like to describe a workflow in word with some macros accessable from the text via hyperlinks on the way. Wouldn´t that be nice? :P


Thank you, once more.



Link to comment
Share on other sites

You're missing a space between the EXE path and the parameter. As I see it what is and should be is:

„C:\Programme\Macro Express3\MeProc.exe“/AGoogle

"C:\Programme\Macro Express3\MeProc.exe“ /AGoogle

If you put this in your run line I am sure it will work. Trick is to get it to work their first then move on to other problems.


As for running it from a link in a Word document I'm not so sure.... I will tell you one can not pass program parameters like that in a hyperlink. I'm thinking you need to create a Word macro that runs form a button click in line with the text or something like that. But maybe you could create a simple batch file and write a hypertext link to it. I'll have to think about that. It's an intriguing idea to launch macros form a hypertext link.


You might also look into using an OLE embedded object.

Link to comment
Share on other sites

This looks correct.

"C:\Programme\Macro Express3\MeProc.exe“ /AGoogle

But if something is changing spaces to %20 then it sounds like you are entering this into the address bar of a browser. This is not a link. You cannot run a macro from a link or hyper-link. You can run a macro from a Windows shortcut or from the Windows Run dialog.

Link to comment
Share on other sites

You're missing a space between the EXE path and the parameter.


Absolutely, i could not recognize this space in the book. But even


„C:\Programme\Macro Express3\MeProc.exe“ /AGoogle


(with space) leads to the same result. It does not work in the run window. Because of the error-message:


"C:\Programme\Macro could not be found" i think it has something to do that the path contains already space:


Macro Express3

as this is where the message ends.


but your macros are working in the run window, right?


Very strange.


Thank you.



Link to comment
Share on other sites

If it has spaces in the path you need to put it in quotes...

Linguistics question: Is the upside down quotes some sort of international thing? Like the upside down question mark before a question in Spanish? I don't think I've ever seen that before. But then again Germans use a weird looking Bs for two Ss.

Link to comment
Share on other sites

Linguistics question: Is the upside down quotes some sort of international thing?


:lol:Congratulation! WE HAVE A WINNER HERE! :lol:


The german quotes begins down and ends up. As i designed the path in MS Word German and copied it in the run window it did not work. Every quote there has to be up.


Nevertheless i´m disapointed. :(


I guess you Cory and Kevin are right. Putting the path in a hyperlink in Word does not work. I´m not 100% sure about. I experience problems entering the correct path. (At least now i know which path is correct)


I want those macroactivating hyperlinks in word. And i want them bad. :angry: This would be awesome.

Can you/somebody me explain what exactly is the problem?


As long i have a workaround:

Export the needed macros as a Playable File (.mxe). The MEX3 Editor supports multiple selection/export as .mxe of macros.

Make a word-hyperlink to that file. It works. Unfortunately a nasty Security Window in Word appears. To get rid of that one you:


  • Open the windows explorer
  • Go to Extras (left from ?)
  • Folderoptions
  • Filetypes
  • Select the Filetype MXE
  • Press Advanced (or similar)
  • Uncheck "Confirm after download"
  • --- Done ---

Have fun with Macros activated via MS Word!


As Kevin pointed out those commandlines work in Windows-Shortcuts as well! So this may make those Floating Menus less important.



Link to comment
Share on other sites

Don´t know what you mean with disaster.


I can launch .exe files, .mxe files and a lot more from word. Why not those macros directly from the library i programmed myself?


What´s the MAJOR Security issue/difference?


As you are from ISS i would like to say that i´m very, very happy i figured out this workaround made possible by your playable macro-feature. Do i get a T-Shirt now? :rolleyes:





Link to comment
Share on other sites

What´s the MAJOR Security issue/difference?

There are appropriate ways to run a program, and consequently run a macro, from Windows. You can activate macros using a variety of techniques. It is a security risk to have a feature do something it was not intended to do. Hyperlinks were not designed to run macros or programs. If something allows a hyperlink to run a macro or a program then it is a security risk.


For more information about security I suggest you visit security related forums and websites. This is beyond the scope of this forum.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...