Mark Calendar Items Read/Unread

With a VBA macro all types of items like appointments, or contacts can be marked read, or unread.

Last modified: 2014/05/23 | Accessed: 29.641  | #105
◀ Previous sample Next sample ▶
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.

For some item types Outlook doesn't offer a command to mark them as read, or unread, for instance for appointment items. However, with a VBA macro it's possible.

Paste the code to the ThisOutlookSession module. Then select any appointments in your calendar, and press ALT+F8 to run the macro.

tip  How to add macros to Outlook
Public Sub ReadItems()
  SetItemsUnread False
End Sub

Public Sub UnreadItems()
  SetItemsUnread True
End Sub

Private Sub SetItemsUnread(ByVal Unread As Boolean)
  Dim coll As VBA.Collection
  Dim obj As Object
  For Each obj In GetCurrentItems
    obj.Unread = Unread
End Sub

Private Function GetCurrentItems() As VBA.Collection
  Dim coll As VBA.Collection
  Dim Win As Object
  Dim Sel As Outlook.Selection
  Dim obj As Object
  Dim i&
  Set coll = New VBA.Collection
  Set Win = Application.ActiveWindow
  If TypeOf Win Is Outlook.Inspector Then
    coll.add Win.CurrentItem
    Set Sel = Win.Selection
    If Not Sel Is Nothing Then
      For i = 1 To Sel.Count
        coll.add Sel(i)
    End If
  End If
  Set GetCurrentItems = coll
End Function
OLKeeper OLKeeper
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails.
email  Send a message