My macros use MacScript heavily, but it doesn\'t seem to be working in any of latest Office for Mac 2016 preview builds
The MacScript command, used to support inline Apple Scripts in Office for Mac 2011, is being deprecated. Due to restrictions of the sandbox, the MacScript command can no longer invoke other applications such as the Finder. Therefore we discourage the use of this command.
For cases which require changing your existing code so it doesn’t use MacScript, you can use the AppleScriptTask command (see below).
The new AppleScriptTask command executes an AppleScript script. This similar to the MacScript command except that it runs an AppleScript file located outside the sandboxed app.
Call AppleScriptTask as follows:
Dim myScriptResult as String
myScriptResult = AppleScriptTask ("MyAppleScriptFile.applescript", "myapplescripthandler", "my parameter string")
Where:
Note: The [bundle id]s for Mac Word, Excel and PowerPoint are:
An example of a handler is as follows:
on myapplescripthandler(paramString)
#do something with paramString
return "You told me " & paramString
end myapplescripthandler