These articles are in the Developer and Code Sample categories. These pages often contain only the code, with very little instructions and assume the reader has some VBA knowledge. See How to use the VBA Editor if you need help using VBA.
Additional code samples are at VBA Code Samples
Use VBScript to Export or Import Categories
The VBScripts on this page will export or import a list of your categories for backup and importing into your Outlook desktop mailbox.
Empty Multiple Deleted Items Folders using a Macro
The scenario: You have several email accounts, each with their own data file and you want to empty the deleted items in every data file with one click. The solution: a macro.
Search PDF Attachments and Forward
This macro uses Adobe Acrobat, not Reader or other PDF applications. This run a script macro will open an attached PDF file, look for a keyword and if found, forward the attachment. If the message you are forwarding contains external content, you may need to respond to a security dialog. In this case, you will
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.
Change the Business Card layout using BusinessCardLayoutXml
How to quickly apply a business card layout to all Outlook contacts so they all use one layout.
Macro to add domains to the Safe Sender list
A user wanted to add domains to the Safe Senders list in Outlook, but the 'not junk' options added addresses, not domains. Sub WriteToJunkList() Dim objApp As Outlook.Application Dim ns As Outlook.NameSpace Dim objMail As MailItem Dim strDomain As String Dim strAddress As String Set objApp = Application Set objMail = objApp.ActiveExplorer.Selection.Item(1) strDomain = Right(objMail.SenderEmailAddress,
VBA: Change the From Account on Replies
A user wanted to always reply to messages sent to one account using another account. He also wanted to remove his address from the recipient list.
How to change the From field on incoming messages
How to use Redemption to change the sender's name field on messages.
Use VBA to move messages with attachments
Use a run a script rule or an ItemAdd macro to look for messages with attachments. When the attachment is a specific file type, do something with the message.
Set a reminder when accepting a meeting request
Use VBA to open an Outlook meeting request that was just added to the calendar after accepting the request in the Inbox. so you can set a reminder or make notes.
Dismiss reminders for past calendar events
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.
Automatically block off time before and after meetings
Use a macro to automatically add travel time to new meetings on your Outlook calendar.
Foward a Message and CC the Original Recipients
A visitor to the Microsoft Answers forum asked about forwarding a message and automatically CCing it to the original recipients.
Add Attachments and Set Email Fields During a Mail Merge
Use an ItemSend macro to set fields on email merges and include attachments.
Import meetings from a CSV or XLSX file
Use a macro to import data from a CSV or Excel xlsx file to create meeting requests or appointments.