OUTBOX: How to tell if the DST Rebasing Tool has been run on a mailbox?

The rebasing tool adds time zone information to appointments that it touches. This time zone information is the same that Outlook 2007 (and patched versions of CDO 1.21) puts on appointments when it creates them. These time zone structures are described here…

http://blogs.msdn.com/stephen_griffin/archive/2006/12/06/outlook-2007-timezone-structures.aspx

What that means is that we cannot discern between appointments that were touched by the rebasing tool and ones that were created or modified by “new” clients (Outlook 2007 or DST patched versions of CDO 1.21). There isn’t any marking on the mailbox itself so what you would have to do is iterate through items in the calendar folder and look for these properties on calendar items. If they exist on any appointment in the calendar then you know that the rebasing tool and/or “new” clients have been there.

You would need to use MAPI, CDO 1.21, or Outlook 2007’s object model to write this code. MAPI is not scriptable and you may not have Outlook 2007 available to you so I would suggest CDO 1.21. The following is a small VBA example which uses CDO 1.21 that you can run in Outlook which will pop up a message box telling you if new clients have been to this mailbox.

Sub Main()

    Dim oSession As New MAPI.Session

   

    oSession.Logon , , False, False, , True

   

    Dim oFolder As MAPI.Folder

    Set oFolder = oSession.GetDefaultFolder(CdoDefaultFolderCalendar)

   

    Dim oMessages As MAPI.Messages

    Set oMessages = oFolder.Messages

   

    Dim oAppt As MAPI.AppointmentItem

    Dim oFields As MAPI.Fields

    Dim oField As MAPI.Field

   

    For Each oAppt In oMessages

On Error Resume Next

        Set oFields = oAppt.Fields

        Set oField = oFields.Item("0x825E", "0220060000000000C000000000000046")

       

        If Not oField Is Nothing Then

            MsgBox "New clients have been here."

            Exit For

        End If

    Next

End Sub

…You can use this VBA code as the beginnings of a script to identify appointments that have been touched by the rebasing or “new clients”. If you don’t get any message box from this script that “New clients have been here” then you know either one of two things: 1) You don’t have any appointments in the calendar that you are the organizer of or 2) The rebasing tool or new clients have not touched any appointments in this calendar…

References:

CDOLive: Property Tags and Types

http://www.cdolive.com/cdo10.htm

BLOG: Outlook 2007 Time Zone Structures

http://blogs.msdn.com/stephen_griffin/archive/2006/12/06/outlook-2007-timezone-structures.aspx

 

More Information:

 

GLEN: Creating a Summary Email of all appointments within a Users Calendar for given period 

http://gsexdev.blogspot.com/2007/02/creating-summary-email-of-all.html

 

GLEN: Creating a Report of Meeting Organizers for all appointments in all calendars on a Server via WebDAV

http://gsexdev.blogspot.com/2007/02/creating-report-of-meeting-organizers.html