The articles listed below contain VBA code samples. Additional code samples are listed at Developer Samples
The following code saves the attachments from selected messages but does not delete the attachments from the message(s). This VBA code is based on the code sample from my Outlook book: Save and Delete Attachments. Use it if you want to save the attachment, add a link to the saved file, and delete the attachment
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.
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.
Use a macro to copy appointments, contacts, tasks, and notes to a *.pst file before removing an IMAP account from Outlook 2013.
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.
New to Outlook 365: Remember Zoom Preferences. If the fonts in incoming messages are tiny (or huge), you may have a Zoom problems. I'll show you how to fix it. If you don't have an Office 365 subscription, I have a macro that will set the zoom level for you.
Macro samples to send messages from a specific email account or email address you have permission to send as.
Another entry in my Lazy Programmer Series, a macro for Outlook users who want to schedule a message to send later. This macro is triggered by a reminder and sends a message, composed from the appointment's subject line and body.
An ItemAdd macro watches a specific folder and runs a macro on it as messages are dropped into it, using any method: using rules, dragging messages to the folder, using the move or copy to folder command, or even copy and paste in place.
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).
Use an Outlook macro or PowerShell script to bulk delete folders from Outlook.
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.
How to use PowerShell to export, import or merge categories in different Outlook mailboxes.
How to use VBA to create a list of your Outlook categories and their assigned colors. For Microsoft Outlook 2007 and up.
How to use VBA to create a list of your color categories then merge or restore the list to another account using a second macro.