Outlook Quick Text | VBA Macro #17

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 Library

Insider 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 Library

Customization

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
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!