Reputation: 1129
I created some Appointments in VB.NET with EWA. It works fine. Now i want to edit the appointment ( date or topic).
for every booking I saved the booking ID in a extended property from the appointment
' Create a definition for the extended property.
Dim extendedPropertyDefinition As New EWS.ExtendedPropertyDefinition(EWS.DefaultExtendedPropertySet.Appointment, EWS.MapiPropertyType.String)
' Add the extended property to an e-mail message object named "appointment".
appointment.SetExtendedProperty(extendedPropertyDefinition, buchungId)
How can I select a appointment with the correct bookingid and edit the topic for example?
Upvotes: 0
Views: 469
Reputation: 957
you can search by items with the Extended property. Your code may look like this (hope c#-Code helps you too, I'm a bit out of practise in VB):
ExtendedPropertyDefinition prop = new ExtendedPropertyDefinition(Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet.PublicStrings, <Name>, MapiPropertyType.String);
SearchFilter filter = new SearchFilter.IsEqualTo(prop, "SearchValue");
FolderId folder = new FolderId(WellKnownFolderName.Inbox)
FindItemsResults<Item> result = service.FindItems(folder, filter, new ItemView(10));
If your "buchungid" is unique, result.Items
should have one item if it's in the inbox.
Upvotes: 1