CustomTaskPane.Window Property

 

Gets the document window that the custom task pane is associated with.

Namespace:   Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

object Window { get; }

Property Value

Type: System.Object

An object that represents the document window that the custom task pane is associated with.

Exception Condition
ObjectDisposedException

The M:Microsoft.Office.Tools.CustomTaskPane.Dispose method of the CustomTaskPane has already been called.

To specify the document window that the custom task pane is associated with, use the window parameter of the Add(UserControl, String, Object) method.

The type of the Window property depends on the application. The following table lists the valid types of the window parameter.

Application

Parameter type

Word

Microsoft.Office.Interop.Word.Window

Excel

Microsoft.Office.Interop.Excel.Window

PowerPoint

Microsoft.Office.Interop.PowerPoint.DocumentWindow

InfoPath

Microsoft.Office.Interop.InfoPath.WindowObject

Outlook

Microsoft.Office.Interop.Outlook.Explorer

-or-

Microsoft.Office.Interop.Outlook.Inspector

For more information, see Custom Task Panes.

Return to top
Show: