Action Pane (Document Level)

Also known as the Document Actions task pane
You can create document action task panes for 2007 and later:
Using the VSTO ActionsPane object
available for Office 2003, Excel and Word from VSTO v2
available for Office 2007, Excel and Word from VSTO v2


Excel - Application.DisplayDocumentActionTaskPane
Word - Application.TaskPanes[wdTaskPanes.wdTaskPaneDocumentActions].Visible = True

ActionsPane.Hide - doesn't work
ActionsPane.Visible - doesn't work

The ActionsPane is actually a SmartDocument solution
ActionsPane.Clear - detach action pane from document
ActionsPane.Show - reattaches actionpane to document

The action pane is represented by the ActionsPane class
An instance of this class is available in both Excel and Word
In Excel - ThisWorkbook.ActionsPane (one per workbook)
In Word - ThisDocument.ActionsPane

Add windows forms controls to the Controls property of the ActionsPane fields

ActionsPane.Controls.Add (New MonthCalendar)
As soon as you add a control the task pane becomes visible immediately (by default).


If Globals.ThisWorkbook.ActionsPane.Controls.Count < 1 Then 
   Application.CommandBars("Task Pane").Visible = False
End If

Display a built-in task pane

Application.TaskPanes(Word.wdTaskPanes.wdTaskPaneFormattng).Visible = True 

Me.CommandBars("Task Pane").Width = 150 

To detach the ActionsPane


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext