EmailAdapterObject Interface

Represents the data adapter for submitting form information in e-mail by using Microsoft Office Outlook.

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

Syntax

'Declaration
<GuidAttribute("096cd5d7-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface EmailAdapterObject _
    Inherits EmailAdapter
'Usage
Dim instance As EmailAdapterObject
[GuidAttribute("096cd5d7-0786-11d1-95fa-0080c78ee3bb")]
public interface EmailAdapterObject : EmailAdapter

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeEmailAdapter.

Use the Item property of the DataAdaptersCollection collection to return an EmailAdapterObject object. Before you can access and use the properties and methods of the EmailAdapterObject, you must cast the object returned from the DataAdaptersCollection to the EmailAdapterObject type.

Examples

The following example retrieves an EmailAdapter object that represents the data connection named "Email Submit" from the DataAdaptersCollection object, sets the To and Subject property, and then submits the current form to the data connection.

EmailAdapterObject myEmailAdapter = 
   ((EmailAdapterObject)thisXDocument.DataAdapters["Email Submit"]);
myEmailAdapter.To = "list@example.com";
myEmailAdapter.Subject = "Status Report";
myEmailAdapter.Submit();
Dim myEmailAdapter As EmailAdapterObject  = _
   DirectCast(thisXDocument.DataAdapters("Email Submit"), _
   EmailAdapterObject);
myEmailAdapter.To = "list@example.com"
myEmailAdapter.Subject = "Status Report"
myEmailAdapter.Submit()

See Also

Reference

EmailAdapterObject Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace