Compartir a través de


MailEnvelope2.AttachmentType Propiedad

Definición

Obtiene o establece el tipo de archivo que se va a adjuntar al mensaje de correo electrónico.

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

Valor de propiedad

que XdAttachmentType especifica el tipo de archivo que se adjunta al mensaje de correo electrónico.

Ejemplos

En el ejemplo siguiente se establece una referencia al objeto MailEnvelope2, se establecen las propiedades del contenedor y después se muestra el contenedor de correo electrónico.

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;

Comentarios

Establezca en XdAttachmentType.xdXml para enviar solo el archivo de formulario (.xml). Establezca en XdAttachmentType.xdXmlXsn para enviar el archivo de formulario (.xml) junto con su archivo de plantilla de formulario asociado (.xsn).

Dado que la propiedad AttachmentType es nueva en Microsoft InfoPath, debe declarar y convertir al MailEnvelope2 tipo para tener acceso a esta propiedad. Para obtener más información, vea Cómo: Usar miembros del modelo de objetos que no son compatibles con InfoPath 2003.

Se puede acceder a este miembro sin restricciones.

Se aplica a