Outlook Developer

Articles and VBA code samples for Microsoft Outlook. Suitable for beginners and intermediate users.

Change Category when Task is marked Completed

Use the ItemChange event to run a macro when the value in a field is changed in Outlook. In this example, when a task is marked complete, the Category is updated.

Always open Contacts to a specific contacts folder

Always open Contacts to a specific contacts folder

Use a VBA macro to always open a specific folder when you switch to a module.

Use a default subject for New messages

Use a default subject for New messages

How to use a VBA macro to insert a predefined text into the subject field of a new messages. Method works with any Outlook item type.

Monitor secondary mailbox folder for new messages

Use a VBA macro to monitor a folder in a secondary mailbox for new messages.

Mail merge to members of a contact group

How to use VBA to mail merge (send individual messages) to members of a Contact Group.

Read MAPI properties not exposed in Outlook's Object Model

How to read MAPI properties that are not exposed in the VBA Object model using the Property Accessor object.

Paste clipboard contents using VBA

Although Outlook VBA doesn't include a paste from clipboard function directly, you can use the MSForms dataobject to transfer the clipboard contents to a string which is then called from VBA.

Create a Task when a message is flagged

Create a Task when a message is flagged

Use the ItemChange event to run a macro when an Outlook item is changed. In this example, a task is created when the Quick Click Flag is clicked.

Assign one task to several people

Assign one task to several people

Use VBA to assign tasks to selected contacts. When a task is assigned to one person, you can keep a copy of the task in your Task folder and the person who accepts the task can send you updates. If the Task is assigned to multiple people, Outlook can’t track it and update the status.

VBA UserForm sample: Select from a list of templates

VBA UserForm sample: Select from a list of templates

How to use a userform and VBA to select from a list of templates when creating a new message to a contact.