Macro IntroHave you ever been prompted to send a follow up email while working in Word? Maybe you are reviewing a meeting agenda or reading a final draft for a new company policy. You can navigate to Outlook create a new email and copy paste the necessary text in. This takes a bit of time and isn’t very efficient. Instead try using our Word Macro Create Outlook Email with Selected Text! This macro will generate an Outlook email directly out of Word pulling in any text you have selected into the Email Body. Simply select some text and run this Word macro. You will see an Outlook email appear confirming that this macro has successfully run. The text you selected will be populated in the body making it easy to reference when drafting your email. By Default, the Email Subject will be populated with the text [Follow Up] Active Document’s Name. You can easily add in To & CC Recipients if you are routinely email the same people! This macro is a better way to generate a follow up email helping you get a quicker response. Instead of writing reminders on Post-it notes start using this macro Create Outlook Email with Selected Text today!
See it in ActionWatch this video to see this macro in action.
CodeHere is the code for this macro. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Word 16.0 Object Library
Insider ContentHere is the Insider code for this macro. This macro will reference an Excel Workbook to display selection options to pull in specific recipients into the To & CC fields of the Outlook email created. Similar to the Outlook Looping In | VBA Macro #28. Your selection option will also be included in the Subject field of the Outlook Email. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Word 16.0 Object Library, Microsoft Excel 16.0 Object Library
CustomizationThese segments of code can be customized to personalize this macro.
The NewEmail.To code segment update = “” to listed out email addresses (separated by 😉 that you want to populate into the NEW Outlook Email’s To field.
The NewEmail.CC code segment update = “” to listed out email addresses (separated by 😉 that you want to populate into the NEW Outlook Email’s CC field.
By Default the NEW Outlook Email Subject will populate with [Follow Up] and the Word Document Name. If you want this to be populated with something else you can update this text here.
'NewEmail.HTMLBody = "" & Word.Selection.Text & "" 'Text selected won’t display color and retain line breaks
This code segment is a comment but this can be removed so the Word Document Text selected populates into the NEW Outlook Email with just text (no colors or line breaks)
This code segment is a comment but this can be removed so the Word Document Text selected populates into the NEW Outlook Email with just text and line breaks (no colors)