![import to vba project excel mac import to vba project excel mac](https://s3.amazonaws.com/webucator-how-tos/79.gif)
Step 4: In the previous steps we have defined the variable now we need to set them. Step 3: We need to send an email in Outlook so define another variable as “ Outlook.Mailitem” as shown in the below screenshot. This is the reference to the VBA Outlook Application. Application as shown in the below screenshot.
![import to vba project excel mac import to vba project excel mac](https://i.stack.imgur.com/ZNa9o.png)
We will name macro as “send_email” as shown in the below screenshot. Step 1: Create a Sub Procedure by naming the macro.
#Import to vba project excel mac code#
#2 – Write a Code to Send Emails from VBA Outlook from Excelįollow the below steps to write the VBA code to send email from outlook from Excel. Without setting the object library as “MICROSOFT OUTLOOK 16.0 OBJECT LIBRARY” we cannot use the IntelliSense properties and methods of VBA which makes writing the code difficult. This process of setting the reference to “MICROSOFT OUTLOOK 16.0 OBJECT LIBRARY” is known as Early Binding.
![import to vba project excel mac import to vba project excel mac](https://www.techonthenet.com/excel/macros/images/what_is_vba2007_001.png)
Now we can use the Microsoft Outlook object in Excel VBA. You can use “ Microsoft Outlook 14.0 Object Library ” if that is the version shown in your computer.Ĭheck the box of Microsoft Outlook as shown in the above screenshot. Step 3: Scroll down in the Reference Object library and select “Microsoft Outlook 16.0 Object Library” to make it available for Excel VBA.ĭepending on the Microsoft office, the Outlook version may be different. Step 2: Go to Tools and then select References as shown in the below screenshot. Step 1: In the Developer Tab click on Visual Basic to open the VB Editor.