Microsoft KB Archive/246616

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 13:50, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


PRB: CDO Can't Send Meeting Requests Based on Custom AppointmentItems

Article ID: 246616

Article Last Modified on 3/4/2004



APPLIES TO

  • Microsoft Collaboration Data Objects 1.2
  • Microsoft Collaboration Data Objects 1.21



This article was previously published under Q246616

SYMPTOMS

When you use CDO (1.2 or 1.21) to programmatically create a MeetingItem from a customized AppointmentItem, and send it to a recipient, the recipient gets a meeting request with a standard AppointmentItem in it. Accepting the meeting request saves a standard AppointmentItem into the recipient's calendar.

Please note that in this scenario, CDO (1.2 or 1.21) doesn't produce any error message when you send the MeetingItem.

CAUSE

This is a design limitation of CDO (1.2 or 1.21) library. It doesn't support sending meeting requests based on custom AppointmentItems.


RESOLUTION

If possible, use Outlook Object model to send such meeting requests. The following Microsoft Visual Basic code demonstrates how to do this using the Outlook Object Model:

'To run the code, please have a reference to Microsoft Outlook Object library from your Visual Basic project.
Set objOlApp = CreateObject("Outlook.Application")
Set objNamespace = objOlApp.GetNamespace("MAPI")<BR/>
objNamespace.Logon
Set objFolder = objNamespace.GetDefaultFolder(olFolderCalendar)
Set objItems = objFolder.Items
Set objItem = objItems.Add("IPM.Appointment.CustomAppointmentItem") 'TO DO:Please replace the message class in parenthesis with your custom AppointmentItem's message class

objItem.MeetingStatus = 1 'olMeeting
objItem.Subject = "Strategy Meeting"
objItem.Start = #12/27/99 1:30:00 PM# 
objItem.Duration = 90
Set objRequiredAttendee = objItem.Recipients.Add("A recipient name goes here")
objItem.Send
                

Keywords: kbmsg kbprb KB246616