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

Free Support Forum - aspose.com

entryId and subject properties for an embedded message attachement


When I get the embedded messages from a msg file, I am trying to get the properties "SysId" and "Subject" for each attachment. These are always both null, and I have found DispalyName is in the subject line, but I do not where I can get the sysId. Do you know if this field is always null in an embedded message attachment? Here is the code I am using to extract the properties:

foreach (MapiAttachment attacment in msgAttachments)


MapiPropertyCollection properties = attachment.Properties;

if (properties[MapiPropertyTag.PR_ENTRYID] != null)

entryId = properties[MapiPropertyTag.PR_ENTRYID].GetLong().ToString();

if (properties[MapiPropertyTag.PR_CREATION_TIME] != null)

created = properties[MapiPropertyTag.PR_CREATION_TIME].GetDateTime().ToShortDateString();

if (properties[MapiPropertyTag.PR_LAST_MODIFICATION_TIME] != null)

modified = properties[MapiPropertyTag.PR_LAST_MODIFICATION_TIME].GetDateTime().ToShortDateString();

if (properties[MapiPropertyTag.PR_DISPLAY_NAME_W] != null)

subject = properties[MapiPropertyTag.PR_DISPLAY_NAME_W].GetString();



Karen Schmidt

Hi Karen,

Could you please see the attached sample project to get the properties from embedded message attachment and test at your end?

I could see the subject, created and modified date properties from the embedded msg files. But I still cannot see the EntryID property. I have logged this bug in our issue tracking system (ID: 14839). We will notify you when we make some progress to resolve this issue. Sorry for the inconvenience.

oops, did you forget to attach a sample project?

Sorry, please check the attachment in this post.

Hi Saqib,

I tried the file and the code that you sent, and I am now able to get to the properties. I see where I needed to change my code. Thank you for the project so I could pinpoint it exactly. Let me know when/if the entryId can be exposed.


Karen Schmidt

Hi Karen,

We are working on it and will notify you as soon as we fix this.

Hi, has there been any progress on this please?

A way to get the Entry ID from MapiMessage would be appreciated. For example, this doesn’t work for me:
var entryId = myMapiMessage.GetPropertyBytes(MapiPropertyTag.PR_ENTRYID);

Hi Phil,

The ticket logged earlier under Id NETWORKNET-14839 was found “Not a bug” during our investigation. Rather it is an expected behaviour of messages to lose the PR_ENTRYID property once they are moved from the Outlook application.

If your scenario is different from the existing thread then please post in a new thread so we may investigate your said issue.

Thank you.