VBA Code Samples

This is a list of the 219 articles published on slipstick.com that contain VBA code samples. The newest code samples and most recently updated pages are listed first.

Macro to Print Outlook email attachments as they arrive

Macro to Print Outlook email attachments as they arrive

An updated macro to print Outlook email attachments as they arrive. This macro works with Outlook 2013 and older, 32 or 64-bit versions, with both 3 and 4 character Office file extensions.

Published or updated on Jul 23, 2014
Use a macro to create a rule to move messages

Use a macro to create a rule to move messages

How to run macros triggers by reminders, update rules using macros, and more.

Published or updated on Jul 23, 2014
Run a script rule: Reply to a message

Run a script rule: Reply to a message

Use a run a script rule to autoreply to a message.

Published or updated on Jul 18, 2014
Combine and Print Multiple Outlook Calendars

Combine and Print Multiple Outlook Calendars

How to copy appointments from several Outlook calendars to print as one calendar.

Published or updated on Jul 15, 2014
Macros to send message using the default account or a specific account

Macros to send message using the default account or a specific account

Macro samples to send messages from a specific email account or email address you have permission to send as.

Published or updated on Jul 15, 2014
Assign a custom form to existing Outlook items

Assign a custom form to existing Outlook items

Use this VBA macro as an alternative to DocMessageClass for changing an Outlook item's message class.

Published or updated on Jul 8, 2014
Create a Task from an Email using a Rule

Create a Task from an Email using a Rule

Create tasks from email as they arrive using a simple script and Rules Wizard. With a slight variation, you can create a task from the message you are reading in the reading pane. Complete instructions and ready-to-use code samples included.

Published or updated on Jul 7, 2014
Run a script rule: Autoreply using a template

Run a script rule: Autoreply using a template

Use a Run a Script rule to autoreply to a message using a template. Include the original message or reply to a web form-generated message.

Published or updated on Jul 2, 2014
Create Birthday Events for Public Folder Contacts

Create Birthday Events for Public Folder Contacts

How to use a macro to create recurring birthday events for contacts in shared calendars in Microsoft Outlook.

Published or updated on Jun 26, 2014
Adding Birthdays and Anniversaries to Outlook's Calendar

Adding Birthdays and Anniversaries to Outlook's Calendar

Help managing Contact birthdays that are automatically added by Outlook to your calendar. Included are macros to added birthdays for imported contacts and to change the reminder time.

Published or updated on Jun 24, 2014
Warn before sending messages to the wrong email address

Warn before sending messages to the wrong email address

Do you accidently send messages to the wrong email address? You can use a VBA macro that checks the outgoing addresses before sending the message.

Published or updated on Jun 24, 2014
Automatically Add a Category to Accepted Meetings

Automatically Add a Category to Accepted Meetings

Use a run a script rule to add a category to an Outlook meeting when the attendee accepts the invitation.

Published or updated on Jun 21, 2014
Autoaccept a Meeting Request using Rules

Autoaccept a Meeting Request using Rules

Use Outlook's Rules Wizard and a Run a Script rule to autoaccept (or decline) meeting requests in Microsoft Outlook. Includes a version that checks your Free/Busy status before accepting (or declining).

Published or updated on Jun 21, 2014
View Messages in Internet Explorer using a macro

View Messages in Internet Explorer using a macro

This code sample saves the selected message as an HTML files and displays it in Internet Explorer. To use: select a message and run the macro. If more than one message is saved, only the first message is saved and opened in Internet Explorer. How to use macros First: You will need macro security set  

Published or updated on Jun 11, 2014
Adjusting Outlook's Zoom setting in Email

Adjusting Outlook's Zoom setting in Email

I get quite a few complaints from people who say their fonts are tiny (or huge) or the font used for the reply shrinks yet Microsoft Outlook shows they are using a normal size font (such as 10 or 12 pt). I'll show you how to fix it. I also have a macro that will set the zoom level for you.

Published or updated on Jun 9, 2014
Remove an Address from Reply All

Remove an Address from Reply All

Use a macro to remove your own addresses when using Reply All in Microsoft Outlook.

Published or updated on Jun 6, 2014
Lookup a Contact's time zone

Lookup a Contact's time zone

How to use an Outlook macro to use a contact's postal code or phone number to look up their time zone.

Published or updated on Jun 6, 2014
Automatically change Appointment categories using VBA

Automatically change Appointment categories using VBA

How to assign a category to appointments automatically, as soon as they are over, using a macro with a trigger, such as the meetings own reminder or the next appointment reminder, that will kick off the macro.

Published or updated on Jun 6, 2014
VBA Sample: Do something when Reply is clicked

VBA Sample: Do something when Reply is clicked

How to "do something" when you click the Reply, Reply All, or Forward button. Add a category, change the subject, add a recipient, add boilerplate text.

Published or updated on Jun 6, 2014
Sort messages by Sender domain

Sort messages by Sender domain

How to sort email messages by domain. Although you can filter by domain simply by typing the domain name in the address field of the filter dialog, you need to use a macro to sort by domain.

Published or updated on Jun 6, 2014