OL98: Incorrect Message Class with Recurring Appointments

ID: Q183024

The information in this article applies to:

SYMPTOMS

You are programmatically manipulating appointment items in Microsoft Outlook 98 and expect the message class of all appointment items to be IPM.Appointment, but the message class of recurring appointments is:

   IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}

WORKAROUND

If you are writing code that expects IPM.Appointment as the message class for recurring appointments, alter the code so that it takes into account that the message class for recurring appointments will begin with IPM.OLE.Class.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/support/supportnet/refguide/default.asp

You can use the following subroutine as an example of how to test to make sure an item is an appointment item. The approach in this example can be applied for use with Visual Basic Scripting Edition (VBScript). Make sure that there is an item open in Outlook prior to running this Visual Basic (VB) or Visual Basic for Applications (VBA) automation code.

   Sub TestAppointment()
      Set ol = CreateObject("Outlook.Application")
      Set MyItem = ol.ActiveInspector.CurrentItem
      MC1 = Left(MyItem.MessageClass, 15)
      MC2 = Left(MyItem.MessageClass, 13)
      If MC1 = "IPM.Appointment" or MC2 = "IPM.OLE.Class" Then
         MsgBox "This is an appointment item."
      Else
         MsgBox "This is not an appointment item."
      End If
   End Sub

You can also use the following automation example in VB or VBA to test for an appointment item. To use this example, you must reference Outlook's object library.

   Sub TestAppointment()
      Set ol = New Outlook.Application
      Set MyItem = ol.ActiveInspector.CurrentItem
      If TypeOf MyItem Is AppointmentItem Then
         MsgBox "This is an appointment item."
      Else
         MsgBox "This is not an appointment item."
      End If
   End Sub

This behavior did not occur with Microsoft Outlook 97. One side effect of this behavior is that older versions of the Outlook Calendar Template for Word 97 will not retrieve recurring appointments when used with Outlook 98.

For more information about obtaining a version of the Outlook Calendar Template for Word 97 that is designed to work with both Outlook 97 and Outlook 98, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q180753
   TITLE     : OL98: Outlook Calendar Template for Word Available on MSL

REFERENCES

For more information about creating solutions with Microsoft Outlook 98, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q180826
   TITLE     : OL98: Resources for Custom Forms and Programming

   ARTICLE-ID: Q182349
   TITLE     : OL98: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol98
Keywords          : OffVBS OffVBA 
Version           : WINDOWS:
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: May 24, 1999