VBA Code Samples

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

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 Feb 27, 2015

Remove reminders from appointments that occur in the past

Two macros to remove reminder from appointments. The first macro removes the reminders as the appointment is created in a specific calendar folder. The other macro removes reminders from older items.

Published or updated on Feb 26, 2015
Use an Outlook Macro to Send Files by Email

Use an Outlook Macro to Send Files by Email

How to send all of the files in a folder as email attachments, one attachment per Outlook message using a VBA macro.

Published or updated on Feb 24, 2015
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 Feb 22, 2015
Add Secure to the Message Subject before Sending

Add Secure to the Message Subject before Sending

Several users asked me how to add secure to the message subject before sending the message. I need a way to change the subject of an email after I hit send. Specific example: If I have a subject that says "meeting", after I hit send I would like the subject to be automatically changed to  

Published or updated on Feb 20, 2015
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 Feb 20, 2015
Log Messages and Attachment Names

Log Messages and Attachment Names

Kamram was looking for a way to create a log file of messages and their attachments. While you can simply select all messages in a folder and copy to Excel, this won't include the attachment names. Fortunately, picking up the attachment names and creating a new message or sending the data to Excel is not  

Published or updated on Feb 19, 2015
Filter and Save Contacts to a CSV File

Filter and Save Contacts to a CSV File

How to use a macro to filter and export Outlook Contacts to a CSV file.

Published or updated on Feb 19, 2015
Fix the Outlook Folder Type after Exporting an IMAP Account

Fix the Outlook Folder Type after Exporting an IMAP Account

After importing IMAP folders to Personal Folders or an Exchange mailbox, messages in the imported folder are hidden.

Published or updated on Feb 19, 2015
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 Feb 15, 2015
Send email from another address using VBA

Send email from another address using VBA

Use VBA to send an email using a Exchange server distribution list address you have Send as permissions for.

Published or updated on Feb 15, 2015
Create a New Message using an HTML File or Stationery

Create a New Message using an HTML File or Stationery

How to create a new message using Stationery or any HTML file using the standard commands of More Stationery or Insert > Insert as Text command. You can also use a macro to create the message.

Published or updated on Feb 13, 2015
Forward Messages that were not Replied To

Forward Messages that were not Replied To

Use a macro to forward Outlook email messages that are waiting for a reply after a number of days.

Published or updated on Feb 13, 2015
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 Feb 12, 2015
Copy new appointments to another calendar using VBA

Copy new appointments to another calendar using VBA

Use VBA to watch for new appointments added to the calendar and copy them to a second calendar. This is useful if you are syncing with a second calendar and only want some items synced. New: watch for updates to the original appointment and change the copied appointment.

Published or updated on Feb 11, 2015
Save selected email message as .msg file

Save selected email message as .msg file

A VBA code sample to save one or more selected messages to your My Documents folder as .msg files, using the received date and time as the filename.

Published or updated on Feb 9, 2015
Batch Import Photos into Outlook Contacts

Batch Import Photos into Outlook Contacts

How to add photos to Outlook contacts, either by editing each contact or using VBA or a utility to add images to all contacts.

Published or updated on Feb 9, 2015
Outlook, Multiple Accounts and the Default Account

Outlook, Multiple Accounts and the Default Account

When you use Microsoft Outlook 2010 or Outlook 2013 and have multiple accounts delivered to different *.pst files, Outlook doesn’t use the default account set in Account settings. Instead, it uses the account associated with the mailbox or *.pst file the folder you are viewing is stored in. This change in behavior doesn't work well when an IMAP is configured to be the default email account and you have a POP3 account delivered to the default pst file.

Published or updated on Feb 9, 2015
Create an Outlook appointment from an email message

Create an Outlook appointment from an email message

A VBA code sample that creates an appointment from an email message and adds it to a shared calendar or a calendar in another data file.

Published or updated on Feb 8, 2015
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 Feb 8, 2015
This site uses XenWord.