Thanks for your reply.
XDocument.Submit presumes you've defined a data connection for submit , correct?
As a test I created a simple form with an email submit button, then defined the data connection. (By the way, such data connections aren't viewable as a data source, per se, are they?)
I extracted the form files and looked in manifest.xsf, finding:
<xsf:submit caption="Su&bmit" disableMenuItem="no" onAfterSubmit="keepOpen" showStatusDialog="yes">
<xsf:emailAdapter name="chris_email" submitAllowed="yes">
<xsf:to value="christian.bahnsen@xxxx" valueType="literal"></xsf:to>
<xsf:intro value="This message was created by a Microsoft Office InfoPath form. The form data may be included as an attachment."></xsf:intro>
<xsf:attachmentFileName value="Form" valueType="literal"></xsf:attachmentFileName>
</xsf:emailAdapter>
</xsf:submit>
Can these xsf properties be set programmatically? This would give me the flexibility to define an adapter on the fly.
If I define multiple xsf:emailAdapters, is there a way to specify which adapter to use? This would give me the flexiblilty to choose from pre-defined adapters.
Are XPathTypedValue and/or EmailSubmitConnection going to be of any help, or are they more oriented toward Visual Studio use rather than in InfoPath jscript or vbscript?
Sorry to pepper you with so many questions.