Jump to content
Macro Express Forums

Newbie Needs Help On Opening A File

Recommended Posts

First, brand new at macro express and not a programmer -- more or of a technical user. So please understand what may be a simple question.


I have a computer that more than one user will have to run the macro I have created. They each sign in to the computer with their specific credentials (for example one person works MWF the other TTH).


I used capture to run through the process I need. Problem is, I create the macro under one set of credentials and it will run fine. When the other person logs in, the macro does not work properly (the environment is the same -- same computer, same programs open, etc). What I'm wondering is if the window size for user 2 is different for user 1 and when I move to the file/open command it is going to a different spot for user 2 and that is why it is blowing up.


So, I was beginning to think about simply issuing a file/open command, but I do not see it listed in any of the various commands. Is there a way to say, programically, open excel file abc?


If not, how else would anyone suggest handling this --- setting the specific window size?


Thanks for any help/ideas.



Link to comment
Share on other sites

Is there a way to say, programically, open excel file abc?

Use the Program Launch command and put the path to the file in 'Program/Path name:' field. This will work for any type of file that has an extension that is associated with an application.


The most likely reason your captured macro did not work when the window sizes changed is because you captured mouse movements and clicks. Most (but not all) actions within programs can be accomplished using keyboard shortcuts. For example, to open a file within Excel you can type:


Alt+fo followed by the path and name of the file.


This will work no matter the size of the Excel window.


In many cases there are issues that come up when you capture a macro. Using the Script Editor to optimize your macro will pay off by allowing you to create a macro that runs quicker and is more reliable.

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