How to get Reading/preview pane's location property (Bottom, Right, Off)

Add-in Express™ Support Service
That's what is more important than anything else

How to get Reading/preview pane's location property (Bottom, Right, Off)
programmatically get the reading pane user option Right/bottom/off  
Subscribe
N.Meyer




Posts: 18
Joined: 2012-11-07
Hi,

I am trying to programmatically figure out where the reading pane is located in outlook (right, bottom or turned off). Is there a way to figure this out programmatically?

I want to set the custom ADX form's(pane) location to BottomReadingPane(when reading pane is set to "right") and to RightReadingPane when the the reading pane is set to "Bottom", depending on the reading pane's location.

There is already an article about this (Add-in Express for .net and VSTO forum), but this does not work in Delphi.

The return of aBar.FindControl is always empty.

Here is an code example:

  aExplorer := OutlookApp.ActiveExplorer;
  if Assigned(aExplorer) then begin
    aBars := aExplorer.CommandBars;
    aControl := aBars.FindControl(EmptyParam, 31134, EmptyParam, EmptyParam);
    if (aControl = nil) then begin
      aControl := aBars.FindControl(13, 31134, EmptyParam, EmptyParam);
    end;
  end;


Hope someone can help me with this.

Thanks in advance.

Nedeljka Meyer
Posted 29 Aug, 2017 10:13:44 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Nedeljka,

Starting from Outlook 2007, you can call Explorer.IsPaneVisible(); see https://msdn.microsoft.com/VBA/Outlook-VBA/articles/explorer-ispanevisible-method-outlook.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Aug, 2017 04:17:19 Top
N.Meyer




Posts: 18
Joined: 2012-11-07
Hello Andrei,

Know how to determine the ExplorerLayout state from Reading pane?

I want to set the custom ADX form's(pane) location to BottomReadingPane(when reading pane is set to "right") and to RightReadingPane when the the reading pane is set to "Bottom", depending on the reading pane's location.


OutlookApp.ActiveExplorer.IsPaneVisible(olPreview) is displayed in the explorer :(.

Depending on von Right/Bottom-Layout property from Reading Pane, we need to position custom ADX form's(pane) differently.

Nedeljka Meyer
Posted 30 Aug, 2017 22:35:45 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Nedeljka,

That was my fault. I'm sorry for it.

In Outlook 2010+, you can analyze the value returned by calling OutlookApp.ActiveExplorer.CommandBars.GetPressedMso(idMsoString); idMsoString can be 'ReadingPaneRight', 'ReadingPaneBottom', and 'ReadingPaneOff'.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Aug, 2017 03:44:28 Top
N.Meyer




Posts: 18
Joined: 2012-11-07
Hello Andrei,

It worked, thanks a lot for your help.

Nedeljka Meyer
Posted 04 Sep, 2017 01:02:08 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Sep, 2017 05:20:01 Top