Share via


_Application3.ActiveWindow property

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

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

Syntax

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

value = instance.ActiveWindow
WindowObject ActiveWindow { get; }

Property value

Type: Microsoft.Office.Interop.InfoPath.WindowObject
A WindowObject object that represents the currently active window.

Implements

_Application2.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.

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

_Application3 interface

_Application3 members

ActiveWindow overload

Microsoft.Office.Interop.InfoPath namespace