I have seen several methods for running macros from AppleScript on the web but none seem to work. This is the one that looks closest to being relevant for Office:mac 2011:
tell application "Microsoft PowerPoint"
run VB macro "myMacroName"
But no matter what I put after run VB macro
, the script editor keeps throwing this error:
Expected end of line, etc. but found identifier.
So I opened the relevant dictionary in the script editor to check that the method exists using File
/ Open Dictionary
, selecting the relevant Microsoft Office:mac application and searching for run VB macro
I found this:
This looks like the macro name and optional parameters are supposed to be on separate lines but that throws the same error.
If it's possible to run a macro and this issue is resolved, where can the macro reside? Only in an open document or can it be called within an installed VBA application add-in too?