Make and Mail PDF files with VBA code on your Mac
Below you find examples for Excel 2011 and Excel 2016 for the Mac, if you are a Windows user check out the code in the Win Tips section of my site.
Excel 2016 for the Mac
Run a Macro from the List. From the Developer Tab, you can access the list of the MACROS, which. For information about VBA for Excel, PowerPoint, and Word, see the following: Excel VBA reference; PowerPoint VBA reference; Word VBA reference; Note. Outlook for Mac and OneNote for Mac do not support VBA. Office 2016 for Mac is sandboxed. Unlike other versions of Office apps that support VBA, Office 2016 for Mac apps are sandboxed. Get Cell Value with Excel VBA. A cell is an individual cell and is also a part of a range, technically there are two methods to interact with a cell in VBA and they are the range method and the cell method, the range method is used like range(“A2”).Value which will give us the value of the A2 cell or we can use the cell method as cells(2,1).value which will also give us the value of A2 cells. To add/enable developer tab in excel 2007, 2010, 2013, 2016 & excel 2011 For Mac. Just Follow these simple steps to insert the developer tab in excel ribbon. Microsoft 365 includes premium Word, Excel, and PowerPoint apps, 1 TB cloud storage in OneDrive, advanced security, and more, all in one convenient subscription. With Microsoft 365, you get features as soon as they are released ensuring you’re always working with the latest. Create, view, edit, and share your spreadsheets using Excel for Mac.

Save as PDF in Mac Excel 2016 (29-7-2017)
Below you can find example VBA code to save as PDF in Mac Excel 2016. Microsoft fixed a few bugs but there are still a lot of bugs to fix, so I will update the code when needed. The code will create a folder in the Office folder to save the PDF files in, read the info on this page why I use a folder in that location. Check out this page if you want an easy way to open this folder in finder : Setup your Mac for Mac Office 2016
Save as PDF and attach to mail in Mac Excel 2016

Mac Outlook 2016 with Mac Excel 2016:
For Mac Outlook 2016 mail code visit this page for examples files and Add-in (1-Feb-2019)
Mac Mail with Mac Excel 2016:
For Apple Maill code visit this page for examples files (1-Feb-2019)
Excel 2011 for the Mac
Download the example workbook below with a few example macro's to create and mail PDF's in Excel 2011. Please test it and give feedback, good or bad. There are Mail examples in the workbook for Apple Mail and Outlook 2011.
Download example file : 29 Nov 2015
Note: Fixed a bug that it not attach the pdf to the mail when you use El Capitan as OS X.
Double-click the dmg file if it does not mount automatically. Drag the file to the folder you want on your Mac. Tip: Use one folder for all your example files (easy to backup your files this way)
Note: When you add new worksheets to the workbook the example code to make a PDF of the whole workbook do not include that sheet or sheets until you Close/Reopen the file.
Vba Code For Excel Macro
There are a few problems(bugs) If you use VBA SaveAs or ExportAsFixedFormat or save a workbook manual as PDF. When you save the workbook as PDF it wil create a seperate PDF for each sheet in the workbook and it also add a sheet name to the file name of the PDF when you do it manual or with code.
My workeround is this :
because creating a pdf of each sheet only happens the first time when you run the code I do this :
1: Create the PDF in a Temporary folder (code will create that for you)
2: Delete all files in this folder
3: Create the pdf again
4: Rename the PDF file (remove the sheet name)
5: Move the file to the folder you want
More Mail Examples
For more information and examples about mailing with VBA code from Mac Excel visit : Send Mail from Mac Excel
What is MAC address?
Excel Vba Code Library
A media access control address (MAC address) is a unique identification assigned to a device network interface controller (NIC) for communication at the data link layer of a network segment. In simple words, this is a unique identification for a device or computer in a network for communication.
You can get more details from here
Use of MAC in excel:
This address my have different usage technically but in Excel,
- You can use this id to restrict the use of a particular file in a particular system.
- This can also be used to generate the activation key for the excel software to use in a particular system.
You can comment and share with others if you have any other use of MAC .
How to get MAC address in excel VBA?
The MAC address of a windows system can be generated using following visual basic code in excel.
This code will generate MAC and display in a message box.
VBA Code for MAC address:
Download Sample excel file to generate MAC ID:
- Copy and paste the above code in VBA code editor
- save file in .xlsm format
- enable macros to execute the VBA code