PC Review


Reply
Thread Tools Rate Thread

Creating extended property using EWS and access it from Outlook Add-in

 
 
New Member
Join Date: May 2011
Posts: 1
 
      16th May 2011
I am currently working on EWS to have some integration of our company application with Exchange 2010. I am using EWS to create appoinment to Exchange 2010 and it works fine; but recently I tried to add some custom/extended property when creating the appointment, below is my code to add the extended property.

Code:
Dim customField As New ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "MyCustomField", MapiPropertyType.String)

appointment.SetExtendedProperty(customField, "CustomFieldValue")
The above codes able to create the custom field to the appointment.

Now here is my problem. When I open up the appointment in Outlook that I created and go to "Developer > Design This Form", then "All Fields" tab, I only see the custom field I created in the "User-defined field in folder" but not in "User-defined field in this item".

I also making an Outlook Add-in to react to the custom field that I created using the EWS when user opens up the appointment in Outlook, when I tried to look for the custom field, couldn't find the custom field, because the custom field is created in "User-defined field in folder" but not in "User-defined field in this item".

This is the codes in the Outlook Add-in and will execute when user opens an apointment in Outlook. But because the custom field is not in "in this item", the .Find() returns Nothing.

Code:
Dim appt As Outlook.AppointmentItem
appt = TryCast(inspector.CurrentItem, Outlook.AppointmentItem)

If appt.UserProperties.Find("MyCustomField") Is Nothing Then
 'Some actions
Else
 'Some actions
End If
What I want to achieve is to create an appointment with the custom field (extended property) using EWS, and then read the custom field (extended property) in Outlook Add-in when user open the appointment in Outlook.

The value that i assigned to the custom field using EWS is shown in the "User-defined field in folder". How to I retrieve the value using Outlook Add-in? Maybe I can retrieve the value and add the custom field to the item?

Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
membership.getallusers add extended property? Guoqi Zheng Microsoft ASP .NET 1 2nd Jun 2006 02:53 PM
membership createuserwizard add extended property. guoqi zheng Microsoft ASP .NET 2 2nd Jun 2006 06:52 AM
Access extended property JC Voon Microsoft VB .NET 0 14th Feb 2005 02:54 AM
outlook web access (OWA) in IE 6 - extended Terry R. Kirby Windows XP Internet Explorer 0 7th Jan 2004 03:30 PM
extended property Jerry Microsoft Dot NET Framework 0 27th Oct 2003 06:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 PM.