Hello:
I have the following code from the good people on the InfoPath Microsoft forum:
{
if (XDocument.Errors.Count > 0)
{XDocument.UI.Alert("Required information is missing as indicated by the red asterisk(s).") ;
return;
}
try
{
XDocument.Submit()
Application.ActiveWindow.Close(true);
}
catch(e)
{
XDocument.UI.Alert(e.description);
}
I need it in order to close InfoPath after submit. Is there any way to modify the Submit statement to submit to a specific data connection? I have one submitting to email and the other submitting to a Sharepoint forms library. I need to use this code, but specify which connection to use.
Thanks so much!
BTW, I'm not a programmer.