VBOffice

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 | Accessed: 23.318  | #68
◀ Previous sample Next sample ▶
Category-Manager Category-Manager
Access the master category list in the blink of an eye, share your color categories in a network, get a reminder service, and more.

The email wil be marked read when it is moved to a subfolder of the inbox. The subfolder is named 'test', adjust the name for your needs.


tip  How to add macros to Outlook
Private WithEvents Items As Outlook.Items

Private Sub Application_Startup()
  Dim Ns As Outlook.NameSpace
  Dim F As Outlook.MAPIFolder

  Set Ns = Application.GetNamespace("MAPI")
  Set F = Ns.GetDefaultFolder(olFolderInbox)
  Set F = F.Folders("test")
  Set Items = F.Items
End Sub

Private Sub Items_ItemAdd(ByVal Item As Object)
  Item.UnRead = False
  Item.Save
End Sub
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.
email  Send a message