2

I have an Excel file that makes heavy use of the MacScript command, which has been deprecated in Excel 2016.

I attempted to use the new AppleScriptTask command as explained in this StackOverflow thread: The MacScript function is not working well in Office for Mac 2016! Any ideas?

I get run-time error 5 - Invalid procedure call or argument.

I'm not permitted by StackOverflow to post images because I'm new and don't have required "reputation." But images are useful to show exactly what I did. So here's a screenshot of my rejected question with embedded images: http://screencast.com/t/KDzY5kJXA

    enter image description here

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
bishop3000
  • 21
  • 3

2 Answers2

0

Just make sure that the Folder name is com.microsoft.Excel with uppercase E in Excel. I see that you have used a lowercase 'e' in Excel. You may have to remove com.microsoft.excel folder that you have created and create a new one. The code you have written is otherwise correct.

ramitarora
  • 421
  • 2
  • 4
  • 10
0

For a simple task like that, it should work. However, in that AppleScript file, you cannot perform complex tasks such as calling a python file to download a youtube file by using do shell script "python3 downloadYT.py"

even though I can run that command in a terminal or execute that AppleScript successfully.

Not sure what is the real limitation for applescripttask in Excel 365 for Mac?

Vasim Hayat
  • 909
  • 11
  • 16
enninet
  • 11
  • 2