How to Extract and edit Outlook appointment attributes when the GlobalAppointmentId is known

I an creating outlook appointment from msAccess and capturing the GlobalAppointmentID when the appointment is created. I would like to update the appointment body when a make certain changes in access.

What is the code for extracting and updating the body of an appointment with a know appointmentid
LVL 16
SheilsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
GlobalAppointmentID is a binary field so you cannot search or filter on it based on my research. One workaround I found on MSDN is to add a GUID to user properties of the appointment and then filter on this GUID.

Create appointment with GUID
Dim outlookApp As New Outlook.Application()
Dim appt As Outlook.AppointmentItem = TryCast(outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem), Outlook.AppointmentItem)
appt.Display(False)
appt.Subject = "XYZ"
appt.Start = DateTime.Now
appt.[End] = DateTime.Now.AddDays(2)
appt.Location = "Here"
appt.UserProperties.Add("GUID", Outlook.OlUserPropertyType.olText)

' The Guid to use 
Dim test As Guid = Guid.NewGuid()
appt.UserProperties("GUID").Value = test.ToString()
appt.Close(Outlook.OlInspectorClose.olSave)

Open in new window


Code to find the appointment later
Dim item As Outlook.AppointmentItem = TryCast(outlook.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar).Items.Find("[GUID]='" + test.ToString() + "'"), Outlook.AppointmentItem)

Open in new window



source
https://social.msdn.microsoft.com/Forums/en-US/fc5fce6d-906a-47f1-be28-67905806e52b/retrive-appointment-item-from-global-appointment-id?forum=vsto
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.