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
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
Is focused on improving computer processes by Leveraging programming and applying Lean principles. It is our goal to make you more efficient and effective on your computer producing “Less Clicks and More Results!”
In regards to Word Create Outlook Email with Selected Text | VBA Macro #29
This is so perfect!
Thank you so much!
At my job, we recently switched over to Office 365.
Previously we had an email template that we could fill out (using field codes [select all+F9]) but that is no longer available in Office 365, as only Word has the Field Code capability now.
I was trying to find some sort of solution using Word, and yours was the best thing I could find on the web!
Very straightforward!
Very appreciated!
YOU are the awesome one!
In regards to Excel Find and Replace across Multiple Word Documents | VBA Macro #30 and custom work.
The use case for CheckTheBible.com was to convert all the variations of Bible verse codes (B C:V - Book Chapter:Verse) in any text to a standardized code. For example, "John 17:21" should be "Joh 17:21." Once the variations are converted, then the next step is to convert them to a markdown language so they can be used in Obsidian.
I found Brent through his YouTube channel: Leverage & Lean (https://www.youtube.com/LeverageLean). Out of all the macro videos, the "Excel Find and Replace across Multiple Word Documents" video seemed like it could help automate a seemingly manual process.
I contacted Brent to see what could be done with my use case. From our first discussion, Brent has always been very understanding and patient with my situation and listened to my suggestions for improving the macro’s speed and efficiency.
Once he understood the end goal, Brent took my improvements to heart and ran with them. Now with this improved macro, I can take on any set of variables, modify a few words, and convert them to the final result. This custom macro searches Word Documents for Bible verse codes, uses a standardized list of 30+ thousand B C:V codes to convert to the markdown language automatically with 100% accuracy.
I have had a great experience working with Brent. Not only does he clarify expectations so it was set up for success, but most importantly, he has always come up with creative and comprehensive suggestions even outside the scope of macro building. Brent was really consulting me to do more than what I had thought possible.