I am a real beginner. don't laugh anyone. How do I set up my new package of MS 7.2 to open an excel file every morning at 7:30am? It will then kick off an embedded macro and create a report I need.
That's it. Seems simple and I am annoyed I can't figure it out myself.
Thanks!
How to open a file
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Outline of basic, crude, steps:
1. Open Excel and create an auto run macro. Consider modifying the macro to exit Excel when all done.
Save the spreadsheet file.
2. Script in Macro Schduler:Save Macro
3. Use Macro Properties to set schedule for 7:30am, daily (M-F?).
4. Keep Macro Scheduler running in systray. Macro should run at 7:30.
Note: Scheduled tasks will not work if not logged in.
1. Open Excel and create an auto run macro. Consider modifying the macro to exit Excel when all done.
Save the spreadsheet file.
2. Script in Macro Schduler:
Code: Select all
ExecuteFile>Drive:\Path\SpreadsheetName.xls
3. Use Macro Properties to set schedule for 7:30am, daily (M-F?).
4. Keep Macro Scheduler running in systray. Macro should run at 7:30.
Note: Scheduled tasks will not work if not logged in.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
You can modify the Macro Scheduler script to look something like the following untested outline:
Execute>Spreadsheet.xls
WaitWindowOpen>Excel*
WaitWindowOpen>MacroWarning*
SetFocus>MacroWarning*
Tab (to the OK/Accept field)
Press ENTER
WaitWindowClosed>MacroWarning*
-----------------------
See HELP for the proper syntax of the commands above
Execute>Spreadsheet.xls
WaitWindowOpen>Excel*
WaitWindowOpen>MacroWarning*
SetFocus>MacroWarning*
Tab (to the OK/Accept field)
Press ENTER
WaitWindowClosed>MacroWarning*
-----------------------
See HELP for the proper syntax of the commands above
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
thanks again for your tips. I am not getting anywhere and my firm cannot offer support on this matter. I have the following in place:
//open file
ExecuteFile>N:\Sharedat\Perf\Urbani\Daily Lipper\Apps\PercentileMaster_v2.xls
//window called "Microsoft Excel" opens asking to enable/disable macro
WaitWindowOpen>Microsoft Excel*
SetFocus>Microsoft Excel*
//Alt-e activates "Enable Macro" command
Press ALT
Send>e
Release ALT
//close window and macro will start
WaitWindowCLosed>*
For some reason, the Alt-e is calling up the drop-down Edit menu, which tells me the WaitWindow command is not being recognized.
What am I missing?
THANKS!
Rei
//open file
ExecuteFile>N:\Sharedat\Perf\Urbani\Daily Lipper\Apps\PercentileMaster_v2.xls
//window called "Microsoft Excel" opens asking to enable/disable macro
WaitWindowOpen>Microsoft Excel*
SetFocus>Microsoft Excel*
//Alt-e activates "Enable Macro" command
Press ALT
Send>e
Release ALT
//close window and macro will start
WaitWindowCLosed>*
For some reason, the Alt-e is calling up the drop-down Edit menu, which tells me the WaitWindow command is not being recognized.
What am I missing?
THANKS!
Rei
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Looking at the code you provided it seems like there should have been a
WaitWindowOpen>EnableMacro*
SetFocus>EnableMacro*
Press>ALT
.....
....
....
The Alt-E that you are sending now is going to the main spreadsheet window. If you have just inserted a Wait> it may be a lucky accident that it is working. If there is any unexpected delay you will still be in the main window. Really should SetFocus> to the window prompting you to enable the Macro.
If you look closely at my original suggestion, there are two WaitWindowOpen> commands. Actually the first one is not needed, only the one that prompts for the enabling of the Macro. You only used one of the lines, but you selected the wrong one. I provided both so you could get a feeling of how the actions can be delayed until a specific window opens.
WaitWindowOpen>EnableMacro*
SetFocus>EnableMacro*
Press>ALT
.....
....
....
The Alt-E that you are sending now is going to the main spreadsheet window. If you have just inserted a Wait> it may be a lucky accident that it is working. If there is any unexpected delay you will still be in the main window. Really should SetFocus> to the window prompting you to enable the Macro.
If you look closely at my original suggestion, there are two WaitWindowOpen> commands. Actually the first one is not needed, only the one that prompts for the enabling of the Macro. You only used one of the lines, but you selected the wrong one. I provided both so you could get a feeling of how the actions can be delayed until a specific window opens.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!