1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01106499"><META NAME="lcid" CONTENT="1033"><title>EmailAdapter Object</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>EmailAdapter Object</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="properties" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="methods" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="events" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><p>Represents the <a href="#" class="glossary" onclick="AppendPopup(this,'xddataadapter')" onkeypress="AppendPopup(this,'xddataadapter')">data adapter</a> for submitting form information in e-mail by using Microsoft Office Outlook.</p><h2>Remarks</h2><p><p><b>Note</b> This object model member is not supported when the <b class="ui">Disable Service Pack features</b> option on the <b class="ui">Advanced</b> tab of the <b class="ui">Options</b> dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.</p></p><h2>Using the EmailAdapter object</h2><p>Use the <b class="bterm"><a href="xdproItem_8_HV01106503.htm" id="HV01106503" lcid=" ">Item</a></b> property of the <a href="xdobjDataAdaptersCollection_HV01103993.htm" id="HV01103993" lcid=" "><b class="bterm">DataAdapters</b></a> collection to return an <b class="bterm">EmailAdapter</b> object.</p><p>In the following example, a reference to the <b class="bterm">EmailAdapter</b> object is set by passing the name of the <b class="bterm">EmailAdapter</b> object to the <b class="bterm">Item</b> property of the <b class="bterm">DataAdapters</b> collection:</p><pre><code>var objEmailAdapter;
objEmailAdapter = XDocument.DataAdapters("Main Submit");</code></pre><p>After the reference has been set, you can use the properties of the <b class="bterm">EmailAdapter</b> object as shown in the following example, which sets the <b class="bterm">To</b> properties and the <b class="bterm">Subject</b> property, then submits the form.</p><pre><code>objEmailAdapter.To = "list@example.com";
objEmailAdapter.Subject = "Status Report";
objEmailAdapter.Submit();</code></pre><p>The <b class="bterm">EmailAdapter</b> object contains the following properties:</p><table><tr><th>Property</th><th>Description</th></tr><tr><td><b class="bterm"><a href="xdproAttachmentFileName_HV01104022.htm" id="HV01104022" lcid=" ">AttachmentFileName</a></b></td><td>Returns or sets the file name to be used for the current form when attached to the e-mail message for an <b class="bterm">EmailAdapter</b> object.
</td></tr><tr><td><b class="bterm"><a href="xdproBCC_2_HV01107068.htm" id="HV01107068" lcid=" ">BCC</a></b></td><td>Returns or sets the BCC recipients for an <b class="bterm">EmailAdapter</b> object.
</td></tr><tr><td><b class="bterm"><a href="xdproCC_2_HV01107066.htm" id="HV01107066" lcid=" ">CC</a></b></td><td>Returns or sets the CC recipients for an <b class="bterm">EmailAdapter</b> object.</td></tr><tr><td><b class="bterm"><a href="xdproIntro_HV01104034.htm" id="HV01104034" lcid=" ">Intro</a></b></td><td>Returns or sets the introduction in the body of the e-mail message for an <b class="bterm">EmailAdapter</b> object.
</td></tr><tr><td><b class="bterm"><a href="xdproName_7_HV01107065.htm" id="HV01107065" lcid=" ">Name</a></b></td><td>Returns the name of an <b class="bterm">EmailAdapter</b> object.</td></tr><tr><td><b class="bterm"><a href="xdproQueryAllowed_4_HV01106507.htm" id="HV01106507" lcid=" ">QueryAllowed</a></b></td><td>Corresponds to the <b class="bterm">queryAllowed</b> attribute in the <a href="#" class="glossary" onclick="AppendPopup(this,'xdformdefinitionfilexsf')" onkeypress="AppendPopup(this,'xdformdefinitionfilexsf')">form definition file (.xsf)</a>. Always returns <b class="bterm">False</b> for the <b class="bterm">EmailAdapter</b> object.</td></tr><tr><td><b class="bterm"><a href="xdproSubject_HV01107063.htm" id="HV01107063" lcid=" ">Subject</a></b></td><td>Returns or sets the subject of the e-mail message for the specified <b class="bterm">EmailAdapter object</b>.</td></tr><tr><td><b class="bterm"><a href="xdproSubmitAllowed_5_HV01106965.htm" id="HV01106965" lcid=" ">SubmitAllowed</a></b></td><td>Corresponds to the <b class="bterm">submitAllowed</b> attribute in the form definition file (.xsf). Always returns <b class="bterm">True</b> for the <b class="bterm">EmailAdapter</b> object.</td></tr><tr><td><b class="bterm"><a href="xdproTo_2_HV01107062.htm" id="HV01107062" lcid=" ">To</a></b></td><td>Returns or sets the To recipients for the specified <b class="bterm">EmailAdapter</b> object.
</td></tr></table><p>The <b class="bterm">EmailAdapter</b> object contains the following methods:</p><table><tr><th>Method</th><th>Description</th></tr><tr><td><b class="bterm"><a href="xdmthQuery_10_HV01106968.htm" id="HV01106968" lcid=" ">Query</a></b></td><td>Because the <b class="bterm">EmailAdapter</b> object is available for submitting data only, this method will always generate a run-time error when it is called on that object.</td></tr><tr><td><b class="bterm"><a href="xdmthSubmit_6_HV01106979.htm" id="HV01106979" lcid=" ">Submit</a></b></td><td>Executes the submit operation on the associated data adapter.</td></tr><tr><td><b class="bterm"><a href="xdmthSubmitData_HV01103990.htm" id="HV01103990" lcid=" ">SubmitData</a></b></td><td>Submits the specified DOM element or DOM document to a data adapter.</td></tr></table><script type="text/javascript" language="JScript" src="ofvbanl.js"></script><span id="ofVBAISpan" class="ofvbaispan"><iframe id="ofVBAIFrame" frameborder="0" marginheight="0" marginwidth="4" scrolling="auto" width="100%" src="../links/xdobjEmailAdapterObject_HV01106499_l.htm"></iframe></span><center><a href="XMLSchemaCopyright_HV01147162.htm">©2003-2004 Microsoft Corporation. All rights reserved.</a>
Permission to copy, display and distribute this document is available at: <a
href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&CTT=11&Origin=HV011232471033"
target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>
|