Share via


Window2.MailEnvelope Property

Gets a reference to the MailEnvelopeObject object associated with the window that is represented by the WindowObject object.

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

Syntax

'Declaration
ReadOnly Property MailEnvelope As MailEnvelopeObject
    Get
'Usage
Dim instance As Window2
Dim value As MailEnvelopeObject

value = instance.MailEnvelope
MailEnvelopeObject MailEnvelope { get; }

Property Value

Type: Microsoft.Office.Interop.InfoPath.MailEnvelopeObject

Implements

Window.MailEnvelope

Remarks

The MailEnvelope object can be used only with the editing window types; if used with a designing window type, it will return an error. It will also return an error if no form is open in the form area.

Examples

In the following example, the MailEnvelope property of the WindowObject object is used to set a reference to the MailEnvelopeObject object.

MailEnvelope myEnv = thisApplication.ActiveWindow.MailEnvelope;

See Also

Reference

Window2 Interface

Window2 Members

MailEnvelope Overload

Microsoft.Office.Interop.InfoPath Namespace