semodlin Posted September 22, 2012 Report Share Posted September 22, 2012 I am trying to learn to use Macro Express Pro better in order to automate many of my office functions. I have been using it for a while and can do some basic things. I ran into a problem that I can't figure out. I want to create a macro that will open Excel and then Open a specific file on my server in Excel. My macro will open Excel. However, I can't figure out how to make the Macro to give Excel the keyboard command ALT F so that I can open the file. Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
Cory Posted September 22, 2012 Report Share Posted September 22, 2012 I use the program launch command but instead of a program I enter the Excel file name. The Windows file extension association kicks in and will load the file in Excel based on your handling settings. Quote Link to comment Share on other sites More sharing options...
semodlin Posted September 22, 2012 Author Report Share Posted September 22, 2012 I didnt think of that. However, once you open the file and do whatever the macro needs to do in the file, how do you save the file? Quote Link to comment Share on other sites More sharing options...
acantor Posted September 23, 2012 Report Share Posted September 23, 2012 I think what Cory was suggesting is a way to NOT use a program's menus (or ribbons) to open a specific file. Program Launch: "EXCEL.EXE" (Normal) Parameters: "c:\tmp\test file.xls" As for your question about saving the file... are you asking how you do it with a macro? It helps to know the keyboard shortcut, Ctrl + s, or using the Ribbon, Alt + f followed by s... // Use Excel's built in hotkey to save... Text Type (Simulate Keystrokes): <CONTROL>s // Interact with the ribbon via typing simulation to save.... Text Type (Simulate Keystrokes): <ALT>f // File ribbon Text Type (Simulate Keystrokes): s // Save Quote Link to comment Share on other sites More sharing options...
Samrae Posted September 24, 2012 Report Share Posted September 24, 2012 Note that Alt + F is not the same as Alt +f. Use lower case letters. This is because Alt + F sends: <Alt Down><Shift Down>f<Shift Up><Alt Up> and Alt + f sends: <Alt Down>f<Alt Up> Many applications, including Excel, do not like the extra shift down and up. 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.