Macro Intro
The average office worker sends roughly 40 emails a day! You could be above or below average but ultimately sending emails takes up a chunk of time. It makes you wonder how many times do you have to type the same thing in your emails? The Outlook Quick Text macro helps you quickly enter text that you use on a frequent basis. This macro displays an InputBox giving you a list of options to select from. Enter the leading number and watch the text populate at the current location of your cursor. This macro frees up capacity between your ears and helps you recall information when sending emails. Using VBA, you can pull in more into the text such as a specific date. Think about the preparation you do for meetings that occur every week. Wouldn’t it be nice if you could enter that date into emails as you work to gather information for the upcoming agenda? That is why the Outlook Quick Text macro can be so powerful. Instead of spending time looking for certain information you can quickly pull it into the email you are currently focused on.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, Microsoft Forms 2.0 Object Library, Microsoft Word 16.0 Object LibraryInsider Content
Here is the Insider code for this macro. This code will allow you to setup an Excel Workbook to manage the Quick Text you want to quickly populate into your Outlook Email! Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Outlook 16.0 Object Library, Microsoft Forms 2.0 Object Library, Microsoft Word 16.0 Object LibraryCustomization
These segments of code can be customized to personalize this macro.When the Outlook Quick Text macro runs it immediately displays a InputBox with the current Quick Text options defined in the Options variable. If you want more Quick Text options add more in the Options variable by copying the last entry. COPY & vbNewLine & _ “4. Quick Text #4” PASTE then update 4. with 5. and change Label Quick Text #4 to something more descriptive.
Using the Options variable and InputBox displays the Quick Text to choose from. If you want to change the InputBox Header update “Outlook Quick Text” in this code line.
When an Action is determined the Outlook Quick Text macro with walk through a ElseIf Statement looking for the Quick Text associated with the Action. If you want more Quick Text options add more in the ElseIf Statement. To this you can COPY ElseIf Action = “4” Then QuickText = “Quick Text #4” PASTE then update “4” with “5” and change “Quick Text #4” to what you want to populate into the Word Document.
If an Option is entered but isn’t found this MsgBox will display. This can be helpful if you know you typed a value the macro confirms if it is recognized. If you don’t want to see this MsgBox remove it or make this code line a comment.
With an Action indicated and a Quick Text selected the Outlook Quick Text macro will now populate the Outlook Email where the cursor is located. If you want to change the finishing behavior of what this macro does with the Quick Text here is where you would do that. Follow this link here to learn more about Selection.InsertBefore and this link here to learn more about Selection.InsertAfter