Share via


CustomTaskPane.Window Property (2007 System)

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

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

Syntax

'Declaration
Public ReadOnly Property Window As Object
'Usage
Dim instance As CustomTaskPane 
Dim value As Object 

value = instance.Window
public Object Window { get; }
public:
property Object^ Window {
    Object^ get ();
}
public function get Window () : Object

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 Overview and Managing Custom Task Panes in Multiple Application Windows.

.NET Framework Security

See Also

Reference

CustomTaskPane Class

CustomTaskPane Members

Microsoft.Office.Tools Namespace

Other Resources

Custom Task Panes Overview

Managing Custom Task Panes in Multiple Application Windows