Issue with Outlook custom properties in shared calendar appointments
zi ad
0
Reputation points
I am using VBA to add an appointment to a shared calendar that includes a custom property, here's an example of the code:
Dim objOutlook As Object
Dim objNamespace As Object
Dim objCalendar As Object
Dim objAppointment As Object
Dim vPropPath As String
Set objOutlook = GetOutlookApp()
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objCalendar = GetOutlookCalendar()
Set objAppointment = objCalendar.items.Add(1)
objAppointment.Subject = vTitle
objAppointment.Body = vBody
vPropPath = "http://schemas.microsoft.com/mapi/id/{00020329-0000-0000-C000-000000000046}/7771001F"
objAppointment.PropertyAccessor.SetProperty vPropPath, "1"
objAppointment.Save
objAppointment.Close 0
Set objAppointment = Nothing
Set objCalendar = Nothing
Set objNamespace = Nothing
Set objOutlook = Nothing
When I check the custom property of the created appointment, it is present initially. However, after Outlook syncs with the Exchange server or when the appointment is edited, the custom property is removed. Thanks in advance.
Sign in to answer