Pratik Ratanpara
Pratik Ratanpara

Reputation: 348

How to get windows explorer full path of opened outlook MSG file?

This question is related to outlook add-in.

I have one MSG file in my file system. lets start with example.

one msg file is located in @"d:\MSG Files\MailItemSubject.msg".

When I open that msg file in the windows explorer, my office plug-in will be started with outlook application. I register my event handler for Outlook.Application.Inspectors.NewInspector. And try to get the full path of the msg file in the handler function.

I want to know where this message file comes. But I have no idea about how to get the full path.

Does anyone meet the same problem? Does anyone have any idea about it? How to get windows explorer full path?

Upvotes: 0

Views: 275

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66255

That information is not exposed through any API. More than that, Outlook creates a temporary message in the default message store and creates a copy of the MSG file there.

Upvotes: 1

Related Questions