Removing Message properties

Hi,

While removing message property, it seems there is some problem. The total count of message properties is equal to the total count after removal of a message property. It is not working.

Hi Aaron,

Please use the RemoveProperty method that removes the existence of property from the properties collection, streams and sub-storages. Please refer to the example code below and let us know if it is helpful to you.

Code:

MapiMessage mapi1 = MapiMessage.FromFile(fileName);
mapi1.RemoveProperty(MapiPropertyTag.PR_COMPANY_NAME);
mapi1.Save(outfileName);