Subscribe to Windows IT Pro
August 22, 2005 12:00 AM

Marking Sent Items as Read

Windows IT Pro
InstantDoc ID #47212
Rating: (3)
Downloads
47212.zip

In "Keeping Sent Mail, but Not in Sent Items," March 2003, InstantDoc ID 37533, you explain how to use Rules Wizard rules to make Outlook store sent items in a specific folder, without keeping a copy in the Sent Items folder. But Outlook displays such sent items as unread mail; how do I mark these items as read?

The Rules Wizard doesn't offer the same Mark as read rule action for outgoing items as it does for incoming items. Instead, you need to use a little Outlook VBA code to watch for new items in the target folders and, as the items arrive, mark them as read.

Listing 1 shows code that sets up two Inbox subfolders named Jane and Flavius for such monitoring. (To download this code, go to http://www.windowsitpro.com/MicrosoftExchangeOutlook, type 47212 in the InstantDoc ID text box, and click the 47212.zip hotlink.) Place this code in the built-in ThisOutlookSession module in VBA. As each new item arrives, the ItemAdd event handler for the folder calls the MarkAsRead subroutine to change the item's UnRead property to False and save the item.

This is a good beginner project for those who haven't worked with Outlook VBA before. Newcomers might want to read up about VBA in my Windows IT Pro article "Back to Basics," August 2001, InstantDoc ID 21522.

Related Content:

ARTICLE TOOLS

Comments
  • rkim01
    4 years ago
    Mar 11, 2008

    i cannot get this code to work. what needs to be changed? As the code is only for incoming not sent items.

  • kbemowski@scriptingprovip.com
    4 years ago
    Feb 26, 2008

    I'm glad that you found the script. Let us know whether it does the trick!

    Karen Bemowski
    Senior editor
    Windows IT Pro, Scripting Pro VIP

  • Andrew
    4 years ago
    Feb 25, 2008

    I've been looking for this script a long time. I hope it works.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.