简体   繁体   中英

Outlook Add-in Development : Detect If Mail Is Opened In Reading Pane Or Not

I have one add-in in ribbon.

This is not VSTO add-in.This is developed in C#.

I have implemented a functionality to enable/disable add-in control on change of mail selection.

What i am facing...

  1. Open outlook
  2. No mail selected
  3. Outlook reading-pane shows 'Select an item to read'
  4. Add-in is being enabled in this case
  5. In this case, I want to disable my add-in control

Outlook Reading Pane View

I want to detect below things:

  • If mail is not opened in outlook reading-pane.
  • If outlook reading-pane showing 'Select item to read'.

Thanks for answers in advanced.

If mail is not opened in outlook reading-pane. If outlook reading-pane showing 'Select item to read'.

In both cases the Selection property returns a Selection object that contains the item or items that are selected in the explorer window.

The Selection property does not include any conversation header objects. Call the Selection.GetSelection method, providing olConversationHeaders as the argument, to obtain conversation header objects that are selected in the explorer.

If the current folder displays a folder home page, this property returns an empty collection. Also, if a group header such as Today , or a conversation group header is selected, the Count property on the returned Selection object is zero.

Also if you want to know whether a reading pane is visible in Outlook you need to use the Explorer.IsPaneVisible method which returns a boolean indicating whether a specific explorer pane is visible.

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