2
votes

I open .msg file and I need to know the full path or at least filename of the file from OutLook AddIn by c#:

    MailItem item = null;

    Inspector insp = Application.ActiveInspector();

    if (insp != null)

    item = (MailItem)insp.CurrentItem;
1

1 Answers

0
votes

If I remeber right the email is imported into (and then only viewed from) a Outlooks database when you open it from the filesystem. As far as I know there is no such property in the object model.

If your application opens the email, remember the source path. If Outlook handles the opening, change you add-in so that the user has to say where he got this email from. :-/