Microsoft Excel

Ron de Bruin
Excel Automation

Microsoft MVP Program

RDBMailActivesheet Add-in : Send Activesheet with Mac Office 2016 as workbook or PDF

With this Add-in you can create a mail with only the activesheet attached as workbook or PDF, you can use variables in named ranges for the subject, body, To, CC, BCC and file name. You can use it for example to mail a invoice to a customer.

Add-in for Mac Outlook 2016 with Mac Excel 2016

You can find the add-in on this page together with a few other example workbooks.

Mail from Mac Excel 2016 with Outlook 2016

 

 

Add-in for Mac Mail with Mac Excel 2016

After you download the zip file you see that there are 3 files in it.

  1. Example workbook with information : TestworkbookMailAddIn.xlsx
  2. The add-in : MacMailAdd-in.xlam
  3. The applescripttask file : RDBMacMailAddIn.scpt

In Mac Excel 2016 we can't use all AppleScript anymore with the VBA MacScript function. we need to use a scriptfile in another location and call that with the new AppleScriptTask function. if you want to know more about the AppleScriptTask function read the information on this page : http://www.rondebruin.nl/mac/applescripttask.htm

Follow the stepes below to copy the RDBMacMailAddIn.scpt file in the correct location.

  1. Open a Finder Window
  2. Hold the Alt key and click Go in the Finder menu bar
  3. Click Library
  4. Click Application Scripts (if it exists; if not create this folder)
  5. Click com.microsoft.Excel if it exists; if not create this folder (note: Capital letter E)
  6. Copy RDBMacMailAddIn.scpt to the com.microsoft.Excel folder.

Note : If you have add one or both folders and have problems with the code on this page reboot your Mac first and test it again.

The add-in you can install with Tools>Excel Add-ins... in the menu bar. After you install the add-in you see a new tab on the Ribbon named RDBMail.

To test the add-in open the example workbook and you see that you have the option to create a mail with the activesheet as PDF or workbook on the RDBMail tab in the Ribbon. Also you can set the account and signature that you want to use. If needed you can delete the buttons on the sheet or make values of the formulas. You can save the variables if you want so it is easy the next time you want to use it.

In the example workbook there is information how to use named ranges to make it easy for you to get all the information in the mail. for example when you have a invoice with the mail address and subject in a worksheet cell.

If you got problems or have suggestions please let me know.

Download

Download version 1.0 (4-Sept-2016)

Note: If you use macOS Sierra signatures are not working anymore,  I am looking for a solution on this moment. To avoid errors you can disable one line in the scpt file.

Add two -- before this line : set message signature to defaultSig

if fieldValue8 is not equal to "" then
	set message signature to MessageSig
else
	--set message signature to defaultSig
end if

You can't use the signatures dropdown of the add-in in Sierra, hope to have a fix soon