exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Office Calendar CDO Duplicate message id

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development
Author Message
David Tabor



Joined: 05 Aug 2007
Posts: 1

PostPosted: Fri Jun 29, 2007 2:27 am    Post subject: Office Calendar CDO Duplicate message id Reply with quote

I am having problems with duplicate message ids in my Office Calendar. I
have installed Tom Howe's Office Calendar at several client locations
without any problems. This client installation is having an odd issue when a
calendar item is saved to the Office Calendar the message id
(urn:schemas:mailheader:message-id) is the same for all saved office
calendar items. Has anyone seen this behavior? Below is the code in the
ProcessCalendar module.

Exchange 2003 SP2, Windows Server 2003 SP1


Public Sub AddItem(bstrURLItem As String)

Dim objPersonalAppointment As New CDO.Appointment
Dim objOfficeAppointment As New CDO.Appointment
Dim objRecurrence As IRecurrencePattern
Dim strOfficeCalendarURL As String
Dim strInitials As String

' Get the first three characters of the users name to put
' in front of the items added to the Office Calendar. The users
' name is the mailbox name, not the profile name.
strInitials = GetInitials(bstrURLItem)

' Reference the new Appointment added to the Personal Calendar.
objPersonalAppointment.DataSource.Open bstrURLItem



' Do not add Holidays to Office Calendar. Outlook adds holidays to
personal
' calendars and these should not all be replicated to the Office
Calendar.
' With 200 users, there would be 200 Christmas entries on December 25.
If objPersonalAppointment.Keywords(0) = "Holiday" Then

' This is a holiday, do not add it.

Else

' If the user chose to save the item to the Office Calendar, the
' BusyStatus was set to "Busy" olBusy(2) or "Out Of Office"
olBusy(3).
' If so, create an item on the Office Calendar.
If objPersonalAppointment.BusyStatus = "BUSY" Or
objPersonalAppointment.BusyStatus = "OOF" Then

' Build a string to the Office Calendar.
strOfficeCalendarURL = GetExchangeURLDomainString & "Public
Folders/Office Calendar/"

MsgBox "Current ID + " +
objPersonalAppointment.Fields("urn:schemas:mailheader:message-id") + " form
id = " + bstrURLItem

With objOfficeAppointment


' Save the Message ID in the Office Calendar Appointment.
.Fields("urn:schemas:mailheader:message-id") =
objPersonalAppointment.Fields("urn:schemas:mailheader:message-id")
.Fields.Update

' Put the values in the new Appointment item for the Office
Calendar.
.AllDayEvent = objPersonalAppointment.AllDayEvent
.BusyStatus = objPersonalAppointment.BusyStatus
.Contact = objPersonalAppointment.Contact
.ContactURL = objPersonalAppointment.ContactURL
.EndTime = objPersonalAppointment.EndTime
.Keywords = objPersonalAppointment.Keywords
.MeetingStatus = objPersonalAppointment.MeetingStatus
.Priority = objPersonalAppointment.Priority
.Resources = objPersonalAppointment.Resources
.ResponseText = objPersonalAppointment.ResponseText
.Sensitivity = objPersonalAppointment.Sensitivity
.StartTime = objPersonalAppointment.StartTime

' Check for Recurring Appointments
If objPersonalAppointment.RecurrencePatterns.Count 0 Then

Set objRecurrence = .RecurrencePatterns.Add("Add")

' If the Appointment is Recurring then put values in the
Office Calendar.
With objRecurrence

.Frequency =
objPersonalAppointment.GetRecurringMaster.RecurrencePatterns(1).Frequency
.Instances =
objPersonalAppointment.GetRecurringMaster.RecurrencePatterns(1).Instances
.Interval =
objPersonalAppointment.GetRecurringMaster.RecurrencePatterns(1).Interval
.PatternEndDate =
objPersonalAppointment.GetRecurringMaster.RecurrencePatterns(1).PatternEndDa
te

If
objPersonalAppointment.GetRecurringMaster.RecurrencePatterns(1).WeekDays.Cou
nt > 0 Then
.WeekDays.Add
objPersonalAppointment.GetRecurringMaster.RecurrencePatterns(1).WeekDays.Ite
m(1)
End If

End With

End If


' If the Appointment is marked as "Private" change the
subject and
' body of the appointment to "Private."
If .Sensitivity = 2 Then
.Location = "Private"
.LocationURL = vbNullString
.Subject = strInitials & "Private"
.TextBody = "Private"
Else
.Location = objPersonalAppointment.Location
.LocationURL = objPersonalAppointment.LocationURL
.Subject = strInitials & objPersonalAppointment.Subject
.TextBody = objPersonalAppointment.TextBody
End If

.Transparent = objPersonalAppointment.Transparent


' Does not include the collection of attachments since
Office Calendar
' is used to reference scheduled information only.

' Save the new Appointment to the Office Calendar.
.DataSource.SaveToContainer strOfficeCalendarURL

End With

End If

End If

' Destroy the object variables.
Set objPersonalAppointment = Nothing
Set objRecurrence = Nothing
Set objOfficeAppointment = Nothing

End Sub

Archived from group: microsoft>public>exchange2000>development
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
How to send message with embbeeded images using WebDAV? Hello, How do i send message with embeeded images using WebDAV? In outlook i need to set the CID field of the attachemnt and than using
Message Interception Exchange 2003 What i need to do is be able to catch all message being sent by my users and, based upon the content of the message, add a disclaimer to those message for both the sender and the recipients. I'm not worried about processing the messages, it's just i dont

Any way to intercept "message read" events? One more question... Is there a way to register an event handler for "message read" or "folder viewed" events? There must be some way anti-virus programs do that for real-time scan, but I couldn't find any APIs online. Anybody can point me where to go?

Internal / External Out of office message in Exchnage 2003 Hi Everyone, I want to have a different set of out of office message for my internal as well as external users in Exchange 2003. The same functionality is available in Exchange 2007 but want to develop the same in Exchnage 2003. I know it is possible also

Office XP Beta and Office 2003 I put Office Xp Beta 2005 onto my computer and it worked fine but when it expired I went back to office 2003. All documents created while using Office Bete will not open with Office 2003. I downloaded the compatability file approx 28 MB but it does not wo
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group