VBOffice

Free VBA macros for Microsoft® Outlook®. Get more than 100 ready-to-use scripts, or use the samples as a template for your own programming.

Category-Manager Category-Manager
With Category-Manager you can group your Outlook categories, share them with other users, filter a folder by category, automatically categorize new emails, and more. You can use the Addin even for IMAP.

71 sample(s) found for Emails


Order by: ▲ Title  Date
Access an Email With CDO 1.21

Up to Outlook 2003 the CDO 1.21 library offered features you couldn't find in the Outlook object model.

Last modified: 2006/01/20

Access the Email Message Header

This sample creates a user defined property and adds the return path so you can see its value for each email in the folder list view.

Last modified: 2009/07/18

Add date at the cursor position

This macro is useful if you want to add a new note, for instance, to a contact or task.

Last modified: 2019/06/13

Assign a Form to an Item

Tell Outlook to use your custom form instead of the default form to display an item.

Last modified: 2009/09/23

Assign Email Categories Before Sending

Check message properties before sending. This sample prompts you if you try to send an email without an assigned category.

Last modified: 2007/04/24

Categorize Emails Automatically

Let a script categorize every new email.

Last modified: 2007/02/01

Check Email Size Before Sending

Get a prompt if the size of an email exceeds a certain limit.

Last modified: 2006/01/18

Confirm an Appointment by Email

Right click an appointment in your calendar, and send a confirmation to its linked contacts.

Last modified: 2010/08/24

Copy Multiline Addresses

This VBA sample copies multi-line text, for instance the mailing address from an email signature, as a single line into the clipboard.

Last modified: 2015/08/14

Create Distributionlist for a Contact Category

Categories are very good for managing your contacts. However, in some cases it might also be good to have the contacts of a given category in a mailing list, which can can used quickly as recipients for an email.

Last modified: 2015/03/12

Delete Email Follow-up Flag when Completed

The script completely removes the flag once the item is completed.

Last modified: 2007/03/15

Delete Original Email When Replying

By clicking on Reply you can automatically delete the original email.

Last modified: 2006/09/26

Delete the Read Email And Open the Next One

See how to open the next email and delete the one you've just read.

Last modified: 2007/01/08

Deleting Reminders of Meeting Requests

Are you bothered if every incoming meeting request has a reminder set? This sample deletes the reminder as soon as the request comes in.

Last modified: 2007/08/17

Determine a Folder for Sent Items

Get some samples for how to save a sent message in another folder than the default Sent Items folder.

Last modified: 2017/10/27

Determine the Cursor Position

Since Word's object model is available in Outlook you can set the cursor to a certain position in a message.

Last modified: 2011/03/24

Directly Enter a Category Name

Before Outlook 2007, you could directly add a category to an item without saving it to the master category list. For Outlook 2007 and up this macro gives you that feature back.

Last modified: 2009/12/15

Display Categorizer for Outgoing Emails

Since Outlook 2007 you can't directly display the categorizer for outgoing e-mails. This sample demonstrates how to display the dialog by code, which works even for IMAP messages.

Last modified: 2008/10/13

Display Number of Attachments

You can see in the inbox whether or not an email has attachments. However, you cannot see the amount of attachments. This macro adds that information to every incoming email.

Last modified: 2015/06/06

ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.
Display the Email Address of the Recipient

Often the display name of an email recipient changes, making it impossible to sort these emails. This macro creates a new field with the pure email address.

Last modified: 2018/02/03

Display the Sender Address in Outlook 2000

This macro enables you to get the sender's address even in older versions of Outlook.

Last modified: 2006/05/05

Edit Subject

See how to edit quickly the subject of received emails.

Last modified: 2016/10/01

Edit the Internet Format for a Contact

This macro allows you to determine the format (plain, html, rtf) to be used for sending emails for each of the three email addresses of a contact.

Last modified: 2006/09/11

Edit the List of Recipients Before Sending

This macro removes some addresses from an email before it leaves your outbox.

Last modified: 2010/02/20

Embed Pictures in an Email

These vba macros show how to embed a picture in an email so the receiver can see it instead of the dreaded red x.

Last modified: 2015/08/24

Expand the Subfolder When a New Message Arrives

Do you sometimes miss a new email because it's automatically moved to a closed subfolder? This macro expands the subfolder so you can see at a glance whether is has new items.

Last modified: 2013/05/23

Export Email Addresses

These samples export the sender addresses or the recipient addresses of selected emails.

Last modified: 2017/04/28

Find Address in CC and Move the Email

This sample finds an address in the list of recipients and then moves the email.

Last modified: 2009/11/23

Find Emails of The Same Topic

Use VBA to search for all emails of the same topic.

Last modified: 2017/01/26

Flag an Email for Follow-up

This demonstrates how to flag emails for follow-up.

Last modified: 2018/05/07

Get the Default Email Account

A VBA macro that tells you which of all the available email accounts is the default one.

Last modified: 2006/11/09

Get the Message Folder

Where is the message stored you're looking at? This macro tells you and can even open the folder for you.

Last modified: 2008/06/08

Get the Receiving Account

This macro tells you by which of your accounts a certain message was received.

Last modified: 2006/05/17

Hide Text in Email

You can hide a text in an email by using a bookmark.

Last modified: 2016/05/25

Insert a Formatted Excel Table into an Email

A sample for how to paste a table from Excel and retaining its formattings.

Last modified: 2007/01/29

Inspector Wrapper: Receive Events of Multiple Emails

Use an inspector wrapper if you need to subscribe to the events of multiple open messages.

Last modified: 2007/04/04

Join Email with Contact Data

This sample demonstrates how to look up the sender of an email and display its contact data in the inbox.

Last modified: 2015/03/30

Link a Contact Item to Other Items

This sample explains the Links property, which is used to join any item (task item, contact item, etc.) with other items.

Last modified: 2014/02/26

OLKeeper OLKeeper
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails.
Mark Emails Automatically as Read

This sample demonstrates how to mark an e-mail as read as soon is it's being copied or moved to a folder.

Last modified: 2008/09/15

Mark Multiple Messages as Spam at Once

This macro allows to add several messages at once to the blocked senders list.

Last modified: 2013/12/06

Merge Email Conversations

This sample shows how to merge any emails to the same conversation.

Last modified: 2016/10/27

Move Completed Emails

This sample demonstrates how to move an item automatically to a subfolder of the inbox as soon as you flag it as completed.

Last modified: 2006/01/18

Move Emails To The Junk Folder

This sample automatically moves empty emails to the junk folder.

Last modified: 2017/06/23

Open Selected Items

This is a macro to open all selected items.

Last modified: 2017/01/31

Outbox does not send

Do you know the problem that an email doesn't leave the outbox? This macro addresses one of the reasons.

Last modified: 2015/09/21

Print Emails Automatically

This sample prints every new email.

Last modified: 2007/03/24

Print First Page of an Email

This example demonstrates how to print just certain pages instead of the entire e-mail.

Last modified: 2015/10/12

Prompt for Missing Subject Before Sending

Another sample for how to check for certain properties before sending an email.

Last modified: 2008/06/19

Purge Deleted IMAP Messages

See how to really delete IMAP messages with a single click.

Last modified: 2008/02/19

Remove Text From Email Subject

This script clears the subject of an email and removes any phrase you want.

Last modified: 2015/02/13

Remove the Quotation Marks from a Sender

Two examples for how to remove troublesome quotation marks or an apostrophe from an email address.

Last modified: 2016/01/05

Reply to an Email With a Template

This sample explains the basics for replying with a template.

Last modified: 2006/01/19

Request an Email Read Receipt

See how to request a read receipt based on the recipient of the message.

Last modified: 2020/05/13

Rule Assistent and Lower Cases

If you create a rule to move a new email automatically to another folder, the rules wizzard ignores upper/lower cases. This script doesn't ignore the subtle distinction.

Last modified: 2015/03/14

Run-a-Script Rule

This explains the basics for writing macros that can be run by a rule.

Last modified: 2006/12/11

Save Emails to the File System

The sample saves incoming emails as *.msg files to the file system.

Last modified: 2006/01/19

Search Address in To Field and Run a Rule

Outlook can run a rule if you are the only recipient of an email. This macro runs a rule if you are the only recipient in the To field, no matter how many other addresses there is in the CC field.

Last modified: 2015/07/24

Reporter Reporter
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month.
Security Model, Part 2

With this little trick you can send emails via Outlook from, for instance, Excel without raising the security prompt in Outlook.

Last modified: 2007/12/19

Send a Copy of Every Email to Yourself

This example sends a copy of each outgoing email to another address. The address is added as BCC so the recipient doesn't see that.

Last modified: 2009/11/17

Send a Word Document As an Attachment

See how to send a document from within Word without blocking the Outlook window.

Last modified: 2014/10/14

Send all Files of a Folder

See how to send all files of a folder as email attachments to a predetermined recipient.

Last modified: 2015/05/11

Send an Email Template

This sends not the draft itself but a the copy of it so you can reuse the draft.

Last modified: 2017/02/25

Send and Delete Email

Send particular emails without saving a copy in your Sent Items folder.

Last modified: 2006/12/06

Send Delay

See how to defer the delivery of your emails. Instead of sending immediately, you could send your emails, for instance, in the evening at six o'clock.

Last modified: 2016/12/01

Send Emails Automatically

See how to send emails automatically and regularly at certain intervals.

Last modified: 2006/01/19

Set the Expiry Date for an Email

Set the expiry date with a single click for those emails you want to keep for just a certain time.

Last modified: 2007/09/21

Suggest Email Addresses

This macro supports an advanced suggestion of email addresses. Find addresses not only by the first letters, but also by the domain, for instance.

Last modified: 2015/06/11

Trigger Actions With Categories

Categories qualify very well for triggering certain actions. See how to build your own Quick Steps.

Last modified: 2016/11/02

▲ Top