Hi All,
I'm working on integrating our Exchange server with our Intranet calendar. I'm trying to pass a GUID from my database to the Exchange appointment via Extended Properties. It's working fine if I filter the view but I need a way of iterating through all appointments within a specific date range and checking if they've got the property attached.
This is my code so far:
Thanks :)service.UseDefaultCredentials = True service.Url = New Uri("https://mail.server.com/ews/exchange.asmx") Using db As New DBDataContext 'Grab events from Portal DB Dim MyCalendar = (From c In db.crm_Calendars Where c._Staff_ID = New Guid("BB12A5EB-1E99-47AD-BA0D-B727FDA47C5B") And c.Type = CalendarType.Personal).FirstOrDefault ' Check with Exchange Dim startDate As DateTime = DateTime.Now Dim endDate As DateTime = DateTime.Now.AddDays(3) Const NUM_APPTS As Integer = 5 Dim calendar As CalendarFolder = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, New PropertySet()) Dim cView As New CalendarView(startDate, endDate, NUM_APPTS) cView.PropertySet = New PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End) Dim appointments As FindItemsResults(Of Appointment) = calendar.FindAppointments(cView) For Each a In appointments Dim def As New ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "AppointmenId", MapiPropertyType.[Strin