vbscript to read user defined properties

B

Bilal

We created a custom form and added a few user defined properties too. Using
EWS we were successfully able to use the custom form and set values to the
user defined properties too. The vb.net code used in EWS to set the user
defined property is shown below

emMessage.ExtendedProperty = New ExtendedPropertyType(0) {}
Dim setSntIdProperty As New PathToExtendedFieldType()
setSntIdProperty.DistinguishedPropertySetId =
DistinguishedPropertySetType.PublicStrings
setSntIdProperty.DistinguishedPropertySetIdSpecified = True
setSntIdProperty.PropertyName = "EmployeeID"
setSntIdProperty.PropertyType = MapiPropertyTypeType.[String]
emMessage.ExtendedProperty(0) = New ExtendedPropertyType()
emMessage.ExtendedProperty(0).ExtendedFieldURI = setSntIdProperty
emMessage.ExtendedProperty(0).Item = "12345"

While viewing in outlook we are able to see the value of employeeID user
defined property too. Now we need to write a vbscript to read the value of
this user defined property in Item_Open event. though serveral attempts were
made using code snippets from various sites, nothing was successful. Any help
on this is greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top