Share via


MailEnvelope2.To property

Gets or sets the send-to 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 To As String
    Get
    Set
'Usage
Dim instance As MailEnvelope2
Dim value As String

value = instance.To

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

Property value

Type: System.String
The recipient (To) addresses.

Implements

MailEnvelope.To

Remarks

The values set for the To property should be a string of valid e-mail addresses. You can specify multiple e-mail addresses by using a semi-colon (";") between each of them.

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

To overload

Microsoft.Office.Interop.InfoPath namespace