Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tsd57

macrumors newbie
Original poster
Jun 29, 2007
23
0
I'm not familiar with how to use Automator, Here's what I want to do:

How can I open a specific Microsoft Excel document just by pressing a function key or some combination of keys? I'd like to be able to do this from any program.
 

dissolve

macrumors 6502a
Aug 23, 2009
546
0
Here's what I would do:

1) Create a new Service in Automator
2) At the top, select "no input" in "any application" from drop down menu
3) Search for "script" in the Library pane and drag over "Run Applescript"
4) Pase the following code in the box:

Code:
on run {input, parameters}
	do shell script("open PATH_TO_FILE")
end run

5) Replace PATH_TO_FILE with the path to your excel file
6) Save it in ~/Library/Services (~ is whatever your Home folder is called)
7) Go to Keyboard pane in System Preferences
8) Click on "Keyboard Shortcuts", select "Services" on the left, find the service you just made, hit Enter and type in the shortcut you want

That should be it. Post back if you have any issues. Hopefully that works.
 

tsd57

macrumors newbie
Original poster
Jun 29, 2007
23
0
Here's what I would do:

1) Create a new Service in Automator
2) At the top, select "no input" in "any application" from drop down menu
3) Search for "script" in the Library pane and drag over "Run Applescript"
4) Pase the following code in the box:

Code:
on run {input, parameters}
	do shell script("open PATH_TO_FILE")
end run

5) Replace PATH_TO_FILE with the path to your excel file
6) Save it in ~/Library/Services (~ is whatever your Home folder is called)
7) Go to Keyboard pane in System Preferences
8) Click on "Keyboard Shortcuts", select "Services" on the left, find the service you just made, hit Enter and type in the shortcut you want

That should be it. Post back if you have any issues. Hopefully that works.

Wow, thanks, this is exactly what I needed. Pretty simple, but it seems like its not made very obvious for most people to program without previous knowledge of automator. Thanks again!
 

dissolve

macrumors 6502a
Aug 23, 2009
546
0
Wow, thanks, this is exactly what I needed. Pretty simple, but it seems like its not made very obvious for most people to program without previous knowledge of automator. Thanks again!

You're welcome :)

You are right, that doesn't seem very obvious. That made me go back and look at Automator and I just realized that Excel (at least in the current version) provides an action to "Open Excel Workbooks". I haven't messed with it too much, but this is more in tune with the ideology of Automator. I just think shell scripts are easier :p
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.