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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Office.Tools Namespace