简体   繁体   中英

How to get reading pane reference from VSTO add-in?

How do you get a reference to a Reading Pane in Outlook? And how do you add an event handler to be notified with the content of the reading pane changes?

As far as I can see, Oulook doesn't consider Reading Pane as an Inspector. When ThisAddIn_Startup is fired, Application.Inspectors.Count is 0, InspectorsEvents_NewInspectorEventHandler also doesn't get fired.

All I want to know is when the message is loaded in the Reading Pane and get a reference to that message (ie sender's email address).

Seems like a simple task, but I can't find a single example on the Internet.

By "ReadingPane" do you mean the pane in the main outlook window that displays the currently selected outlook message?

If so, I don't believe you access the pane directly, instead you query for the active folder and the selected message within that folder and then operate on the message directly.

Be careful, the selected message is not always the message in the reading pane. If you are manipulating context menus, ActiveExplorer() .Selection will contain the item the the context menu is acting on, instead of the item selected in the reading pane.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM