Exchange Support Team Central Europe

This Blog is managed by several Microsoft support specialists from the Exchange Server Support Team in Central Europe.

CDO & usage of the meetingitem respond method

CDO & usage of the meetingitem respond method

  • Comments 1
  • Likes

We recently had to troubleshoot an issue with CDO responses to meeting updates.

It turns out that MS09-003 contained a code change from KB 913579.

913579 An update to a recurring meeting request that is sent from Exchange Server 2003 does not occur on the receiver side
http://support.microsoft.com/default.aspx?scid=kb;EN-US;913579

All Exchange 2003 Hot-fixes are cumulative!

The purpose of the code change was a stricter enforcing of RFC compliance for iCalendar messages.

The property written to urn:schemas:calendar:sequence is now written to the dispidApptSequence named property used by Outlook if it is not present.
This occurs during local delivery and content conversion of the message.

This caused problems in the logic for the CDO Application in that, when calling the "respond" function on the Meeting Update message, the dispidApptSequence  number was not being copied to the  meeting response, and the urn:schemas:calendar:sequence was already set with a value of "0".
Outlook does not use the urn:schemas:calendar:version property.

The Exchange Server sees the messages with only the 1 property set, and overwrites the one used by Outlook with "0".

This means that when calling the respond method on meeting updates / requests, the sequence number must be read from the request and written to the response, otherwise Outlook will not be able to match the response to the original meeting.
(The proposed solution is to read the dispidApptSequence from the original message and write this to the meeting update response before sending.)

This requirement to keep the sequence number updated is actually listed in our MAPI protocol documentation, however it is not automatically enforced by CDO.

See: http://msdn.microsoft.com/en-us/library/ee218725.aspx

Here is the sample VB-Script used to verify the code change:

(This code is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.)

<script>
Dim sess,spMeetingResponse ,spAppointment ,spMeetingItem ,pMessages ,pFolder
const PidLidAppointmentSequence = "0x8201"
const CdoPropSetID1 = "0220060000000000C000000000000046"
 
Set sess = CreateObject("MAPI.Session")
sess.Logon
 
Set pFolder = sess.Inbox
Set pMessages = pFolder.Messages
Set spMeetingItem = pMessages.GetLast()
Set spAppointment = spMeetingItem.GetAssociatedAppointment()
 
spAppointment.Update()
 
iSeqNum=spMeetingItem.Fields.Item("{" & CdoPropSetID1 & "}" & PidLidAppointmentSequence  ).Value
 
 
Set spMeetingResponse = spMeetingItem.Respond(3)
bstrSubject = spMeetingResponse.Subject
spMeetingResponse.Subject = "Accepted: " & bstrSubject
spMeetingResponse.Fields.Add PidLidAppointmentSequence,3,iSeqNum,CdoPropSetID1
spMeetingResponse.Send
 
sess.Logoff
 
Set spMeetingResponse = Nothing
Set spAppointment = Nothing
Set spMeetingItem = NOthing
Set pMessages = nothing
Set pFolder = NOthing
Set sess = Nothing
MsgBox "Done."
</script>

Comments
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment