David Truxall

Adrift in .Net

<January 2009>
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567


Navigation

Other Good Blogs

My Other Articles on CodeProject

Subscriptions

News

Day of .Net October 18, 2008 - Be there!
View David Truxall's profile on LinkedIn
My presentations on SlideShare

Post Categories



Tuesday, May 16, 2006 - Posts

VSTO Action Pane Closing

When creating VSTO documents that use an Action Pane, the Action Pane gets "lost" if you open another non-VSTO document. The Action Pane is hidden by the different document (as it should), but when you switch back to the original VSTO document, the Action Pane does not automatically re-open itself. This can be fixed by handling the ThisWorkbook_WindowActivate event. In this event we can check the state of the Actions Pane and re-display it if necessary:

private void ThisWorkbook_WindowActivate(Microsoft.Office.Interop.Excel.Window Wn)
{
    if (!Globals.ThisWorkbook.ActionsPane.Visible)
    {
        Globals.ThisWorkbook.ActionsPane.Visible = true;
    }

    if (!ThisApplication.DisplayDocumentActionTaskPane)
    {
        ThisApplication.DisplayDocumentActionTaskPane = true;
    }
}

posted Tuesday, May 16, 2006 10:48 AM by davetrux with 0 Comments




Powered by Dot Net Junkies, by Telligent Systems