MailEnvelope2.AttachmentType 属性

定义

获取或设置要附加到电子邮件的文件的类型。

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

属性值

一个 XdAttachmentType ,指定附加到电子邮件的文件类型。

示例

以下示例设置对 MailEnvelope2 对象的引用,设置信封属性,然后显示电子邮件信封。

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;

注解

设置为 XdAttachmentType.xdXml 以便只发送表单文件 (.xml)。 设置为 XdAttachmentType.xdXmlXsn 以便发送表单文件 (.xml) 及其关联的表单模板文件 (.xsn)。

适用于