johnboy691 Posted November 16, 2007 Report Share Posted November 16, 2007 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? Thanks, John Quote Link to comment Share on other sites More sharing options...
kevin Posted November 16, 2007 Report Share Posted November 16, 2007 We have not had any reports of problems with variables in the Activate/Launch Program command. I think it is more likely that Windows is expecting a file extension for your notepad file. Try 'C:\Documents and Settings\%T1%\Desktop\Ors comments.txt'. Quote Link to comment Share on other sites More sharing options...
johnboy691 Posted November 19, 2007 Author Report Share Posted November 19, 2007 Kevin: Thanks, it worked! I must have mis-keyed something the first time when I added the extension. (No matter how ofter we proof something....) Appreciate you getting back to me because if ME should do it and it doesn't, I know it's my fault. :-) Happy Turkey day everyone! John Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.