We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Trouble getting named properties from MSG

I have a MSG file (outlook task) that I am having some trouble getting the vlaue for a named property.

How can I pull the named property “IsRecurring” from the MSG? Is there a way I can get a list of MapiNamedProperties? It looks like i can only create a dictionary with key/value…


Hi Scott,

You may directly access a property by property tag name. Please visit http://www.aspose.com/documentation/.net-components/aspose.network-for-.net/accessing-outlook-mapi-property.html for an example in which “Subject” property is accessed from the msg file.

And if you know the string name of the MAPI property, you may also use a foreach loop on the property values and an “if” condition to check your desired property. The sample code would look like:

MapiMessage msg = MapiMessage.FromFile(“Test.msg”);
MapiPropertyCollection mapiCollection = msg.NamedProperties;
foreach (MapiNamedProperty mapiNamedProp in mapiCollection.Values)
if (mapiNamedProp.Oom == “IsRecurring”)