Home > Mobile >  outtlook mailitem userproperty change type
outtlook mailitem userproperty change type

Time:09-02

hi is it possible to change user properties type after it has been added

mailItem.UserProperties.Add("rating", Microsoft.Office.Interop.Outlook.OlUserPropertyType.olNumber, false, 1);
mailItem.save()

can i change it to olText by code

CodePudding user response:

The Outlook object model doesn't provide any property or method for that. You need to add another property with a different property type.

CodePudding user response:

No, once a property with a particular name had been used once in a particular message store, you won't be able to change its type (e.g., from string to int). This is a MAPI limitation.

You need to create a property with a different name. Keep in mind that named properties are a limited resource, you can at most have 65k of them in a given store, and Outlook uses around 1000 or so.

  • Related