Edit

Share via


MailEnvelope2.AttachmentType Property

Definition

Gets or sets the type of file to be attached to the e-mail message.

public:
 property Microsoft::Office::Interop::InfoPath::XdAttachmentType AttachmentType { Microsoft::Office::Interop::InfoPath::XdAttachmentType get(); void set(Microsoft::Office::Interop::InfoPath::XdAttachmentType value); };
public Microsoft.Office.Interop.InfoPath.XdAttachmentType AttachmentType { get; set; }
member this.AttachmentType : Microsoft.Office.Interop.InfoPath.XdAttachmentType with get, set
Public Property AttachmentType As XdAttachmentType

Property Value

An XdAttachmentType that specifies the type of file that is attached to the e-mail message.

Examples

The following example sets a reference to the MailEnvelope2 object, sets envelope properties, and then displays the e-mail envelope.

MailEnvelope2 myEnv = 
   (MailEnvelope2)thisApplication.ActiveWindow.MailEnvelope;
myEnv.To = "someone@example.com";
myEnv.<span class="label">CC</span> = "someone@example.com";
myEnv.BCC = "someone@example.com";
myEnv.Subject = "Test e-mail message";
myEnv.Intro = "This is the InfoPath form you requested.";
myEnv.<span class="label">AttachmentType</span> = XdAttachmentType.xdXmlXsn;

// Display form with e-mail envelope.
myEnv.Visible = true;

Remarks

Set to XdAttachmentType.xdXml to send only the form file (.xml). Set to XdAttachmentType.xdXmlXsn to send the form file (.xml) along with its associated form template file (.xsn).

Applies to