VBA Code Samples

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

Mail merge and send from a distribution group

Mail merge and send from a distribution group

How to use a macro to mail merge to email, add attachments, and send the messages from a different email address.

Published or updated on Aug 22, 2014
How to use Outlook's VBA Editor

How to use Outlook's VBA Editor

Basic instructions on using Outlook's VBA editor: how to open it, where to put the code, how to sign your code.

Published or updated on Aug 18, 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 Aug 13, 2014
Show the Home Address on a Contact Form by Default

Show the Home Address on a Contact Form by Default

How to customize Outlook Contacts so that the Home address is the default address for all new contacts.

Published or updated on Aug 8, 2014
Macro to Move Aged Email Messages

Macro to Move Aged Email Messages

How to use a macro to move email, meeting requests, and more to another folder as they age or using other conditions. Create folders for the sender's display name to move the messages to.

Published or updated on Aug 8, 2014
Use VBA to create an Outlook search folder using the selected message

Use VBA to create an Outlook search folder using the selected message

How to use VBA to create a search folder for the sender's address from a selected message. VBA code sample included.

Published or updated on Aug 7, 2014
Macro to file Outlook email by sender's display name

Macro to file Outlook email by sender's display name

Use a macro to file Outlook Email in folders by sender's name. Or file your email by received date.

Published or updated on Aug 7, 2014
Working with All Items in a Folder or Selected Items

Working with All Items in a Folder or Selected Items

These samples contains the basic code for working with all items in a selected folder or selected items in a folder.

Published or updated on Aug 7, 2014
Categorize Contacts with bad addresses

Categorize Contacts with bad addresses

Outlook doesn't have an automated method for assigning categories or deleting contacts that contain bad addresses, but you can use VBA to assign categories or delete the contacts.

Published or updated on Aug 4, 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 Aug 2, 2014
Create a custom Send to... shortcut

Create a custom Send to... shortcut

How to create your own send to shortcut that uses your Outlook stationery and signature. Customize the shortcuts to include the email addresses and more.

Published or updated on Aug 1, 2014
Map Contact Addresses or Meeting Locations

Map Contact Addresses or Meeting Locations

How to create a map or driving directions to one or more Outlook Contact's address or Meeting locations using VBA.

Published or updated on Aug 1, 2014
Reply or ReplyAll with Attachments

Reply or ReplyAll with Attachments

Unlike Lotus Notes, Outlook does not include a built in method to reply or reply all and include the original attachments in the reply. However there are ways to do it, including using VBA to create custom reply and reply all buttons. We show you how.

Published or updated on Jul 29, 2014
Processing Incoming E-mails with Macros

Processing Incoming E-mails with Macros

The Rules Wizard is great for a lot of things when automatically processing incoming e-mails. However, when there's that one certain thing that you can't do with it, you can always be the Wizard yourself and write your own rules with VBA. However, one of the greatest challenges for developers programming with Outlook is learning  

Published or updated on Jul 24, 2014
Bulk Change Email Display Name Format

Bulk Change Email Display Name Format

Use a macro to make changes to any Outlook contact field, by folder or by selection.

Published or updated on Jul 24, 2014
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
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