Jump to content
Macro Express Forums

Activate or Launch program using variable


Recommended Posts

Hi ME Lovers:


Company programs/files are stored in files with the same paths except each employee has a unique folder based upon their name. So it's been hard to make a general macro to open or save a file using the macro. I tried using the Set Variable command to capture the Path to Desktop which shows "C:\Documents and Settings\jsmith\Desktop, and that works, putting it to variable T1.


I was hoping I could then modify the variable T1 to capture just the jsmith...which I can.


I then used the Activate/Launch Program command, set the Window Title: ORS comments (which is a notepad file)


And in Program Path/Name: put C:\Documents and Settings\%T1%\Desktop\Ors comments (I've tried it like this and with the extension.)


However, when I run the macro I get the error: The specified Program "Ors comments" could not be launched. The following error occured: The specified file was not found. The macro will abort.


I am assuming the %T1% variable isn't being read as jsmith by the Activate/Launch Program command.


Any ideas on what I am doing wrong...and/or an idea as to what new path to follow?




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...