The legacy "MacScript" VB Command is severely limited by Apple’s sandbox requirements: it will not work correctly in most situations in Office 2016. Updating the MacScript function seems to be too difficult.
Instead, Microsoft added a new VB command "AppleScriptTask" that accesses and runs an AppleScript file located outside the sandboxed app. This new approach is not as convenient: with the MacScript function you could have the script in the file itself, while with the AppleScriptTask method you need to distribute an extra file containing the script, and it must be placed in the specified location on the user’s system to have permission to run. This requires some user interaction the first time.
See this page if you want to learn more : AppleScriptTask in Office 2016 for the Mac
If you use Outlook 2016 check out this page : Mail from Mac Excel 2016 with Outlook 2016
Download example and script file (File date : 30-Sept-2016, add a fix for macOS Sierra)
If you not use macOS Sierra you can change this part of the scpt file so it automatic use the default signature, in Sierra signatures are not working on this moment.
Will update the code in When there is a update for Sierra
if fieldValue8 is not equal to "" then set message signature to MessageSig end ifTo this :
if fieldValue8 is not equal to "" then set message signature to MessageSig else set message signature to defaultSig end if
Where must I copy the file(RDBMacMail.scpt) with the script :
Open a Finder Window
Hold the Alt key when you press on Go in the Finder menu bar
Click on Library
Click on Application Scripts (if it exists; if not create this folder)
Click on com.microsoft.Excel (if it exists; if not create this folder) note: Capital letter E
Copy the script file from the download inside this folder
Now open the Excel file and read the information on the worksheet how you can test the code, please give feedback if you have problems because it is new for me also and there is almost no documentation about it. It is trial and error to get things working in Office 2016 the same way as in Office 2011.
Many thanks to Bastiaan Boertien(applescript specialist) for his help to get this working