Hello,
I’m having significant problems trying to open a file
in Microsoft Excel X for Mac with Applescript.
Here’s my code:
set repo_prompt to
"Please select document"
set f_default to path to
desktop folder as alias
set repo_design to choose
file with prompt repo_prompt default location f_default without invisibles
tell application
"Microsoft Excel"
Activate
Open
repo_design
end tell
I select a .xls document when
prompted and then I get the Applescript Error: “Microsoft Excel got an
error: ‘’ could not be found.__Check the spelling of the file name,
and verify that the file location is correct. If you are trying to open’’”
In the event log it shows that when I
select my document It returns it as:
Alias “G4-PB2:Users:etc”
as would be expected.
If I switch the line tell
application "Microsoft Excel" to tell
application "BBEdit" and select a .txt or .xml file
BBEdit opens the file fine as I would hope. Can anyone tell me why Excel is
rejecting my code?
Thanks very much for your time, and
have a good day.
Andy