Outlook Create Email for each Attachment | VBA Macro #78

Macro Intro

Imagine that you are a manager that receives an email every week with multiple attachments. Each attachment is dedicated for one of your ten employees and now you need to send an email to each employee with their attachment. If you find yourself on the receiving end of an email with multiple attachments that then need to be distributed to specific recipients this can be a tedious task. You could waste clicks to create multiple new emails and spending time navigating to drag and drop attachments over to each open email or you could do save time using the Outlook Create Email for each Attachment macro! This Outlook macro will loop through all the emails you have selected and create a new email for each attachment found and attach that attachment to that new email. This Outlook macro can be extremely useful if you find yourself in this situation more times than not and need a way to complete this task efficiently and effectively. If you are looking for something a bit more powerful checkout the Insider version of the Outlook Create Email for each Attachment macro. This Outlook macro will create an email for each attachment found but also reference an Excel Workbook to set the email recipient(s) based on criteria that you determine. This Insider Outlook macro will give you the option to group email attachments in an email by file type. For example, certain recipient(s) need email attachments that are .pdf while others need to receive .txt files. Not only will the Insider version of this Outlook macro save you time, but it will also ensure that you don’t make a critical mistake sending the wrong email attachment to a recipient.

See it in Action

Watch this video to see this macro in action.

Code

Here is the code for this macro. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Outlook 16.0 Object Library

Insider Content

Here is the Insider code for this macro. The Insider version of the Outlook Create Email for each Attachment macro will allow you to reference an Excel Workbook used to determine who the To & CC recipient should be for each attachment email created! This Insider Outlook macro loop through the columns in row one of the Excel Workbook. If the text is found within the Attachment Name or File Extension the rows below the column are used to determine who to To & CC Outlook recipients are. Prefix the Email Addresses with a To- or CC- to determine where the recipients should be set withing the Outlook email. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Outlook 16.0 Object Library, Microsoft Excel 16.0 Object Library

Search

First time using VBA?

The Developer Tab is an additional section of the ribbon when activated allows you access to Visual Basic in Applications like Access, Excel, Outlook, PowerPoint, Word.
Setup Now
Once the Developer Tab is available you will have the capability to update your security to allow Macros to run in the current application.
Setup Now
A sub of code is a collection of objects and variables. For the code to successfully run a library of references needs to be set.
Setup Now
Subscribe as an Insider to receive additional rights.
If you like our content and want to show your support tip us here!

Contact Us

Looking to improve your computer processes?
Leverage & Lean is here to help!

Powered By MemberPress WooCommerce Plus Integration

Free Macro

Start creating Less Clicks, More Results today!