Share via


MailEnvelope2.Subject property

Gets or sets the subject value used in the MailEnvelopeObject object that is associated with a WindowObject object.

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

Syntax

'Declaration
Property Subject As String
    Get
    Set
'Usage
Dim instance As MailEnvelope2
Dim value As String

value = instance.Subject

instance.Subject = value
string Subject { get; set; }

Property value

Type: System.String
The subject line.

Implements

MailEnvelope.Subject

Remarks

The MailEnvelope object does not support the programmatic creation of the body of an e-mail message. Users enter the body text after the e-mail message is displayed in Microsoft Outlook.

Examples

MailEnvelopeObject myEnv = thisApplication.ActiveWindow.MailEnvelope;
myEnv.To = "someone@example.com";
myEnv.CC = "someone@example.com";
myEnv.BCC = "someone@example.com";
myEnv.Subject = "Test e-mail message";

See also

Reference

MailEnvelope2 interface

MailEnvelope2 members

Subject overload

Microsoft.Office.Interop.InfoPath namespace