Partilhar via


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)

Syntax

'Declaration
ReadOnly Property Window As Object
Object Window { get; }

Property Value

Type: System.Object
An object that represents the document window that the custom task pane is associated with.

Exceptions

Exception Condition
ObjectDisposedException

The Dispose method of the CustomTaskPane has already been called.

Remarks

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.

.NET Framework Security

See Also

Reference

CustomTaskPane Interface

Microsoft.Office.Tools Namespace

Other Resources

Custom Task Panes