Share via


_Application2.ActiveWindow Property

Gets a reference to a WindowObject object that represents the currently active window.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property ActiveWindow As WindowObject
    Get
'Usage
Dim instance As _Application2
Dim value As WindowObject

value = instance.ActiveWindow
WindowObject ActiveWindow { get; }

Property Value

Type: Microsoft.Office.Interop.InfoPath.SemiTrust.WindowObject

Implements

_Application.ActiveWindow

Remarks

Using the ActiveWindow property, you can gain immediate access to the window that is currently being viewed by the user, and then use the properties and methods of the Window object that it returns.

Important

This member can be accessed without restrictions.

Examples

In the following example, the ActiveWindow property is used to gain access to the MailEnvelope property of the WindowObject object that returns a MailEnvelopeObject object.

MailEnvelope email = thisApplication.ActiveWindow.MailEnvelope;
email.Subject = getNode(@"/mtg:meetingAgenda/mtg:subject").text;
email.To = aliases + "; ";
email.Visible = true;

See Also

Reference

_Application2 Interface

_Application2 Members

ActiveWindow Overload

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace