<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Exporting InfoPath fields to a new task in Outlook</title><link>https://www.infopathdev.com:443/forums/thread/19413.aspx</link><pubDate>Sun, 29 Apr 2007 19:04:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19413</guid><dc:creator>solvold</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19413.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=19413</wfw:commentRss><description>&lt;p&gt;Hey, where can i find the jscript code of the dataconnections?&lt;/p&gt;&lt;p&gt;&amp;nbsp;I would love to get my hands on that, to filter what datafields i want to put into the body of an email.&lt;/p&gt;</description></item><item><title>Re: Exporting InfoPath fields to a new task in Outlook</title><link>https://www.infopathdev.com:443/forums/thread/14642.aspx</link><pubDate>Fri, 09 Jun 2006 13:48:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14642</guid><dc:creator>madhuri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14642.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14642</wfw:commentRss><description>Hi&lt;br /&gt;&lt;br /&gt;To export the required fields to Outlook, you will need to create Data connection and write code&lt;br /&gt;&lt;br /&gt;You will first have to add E-mail as a Submitting Data Source. &lt;br /&gt;&lt;br /&gt;1) In Design mode, choose Data Connections from the Tools Menu and then &lt;br /&gt;click Add.&lt;br /&gt;2) Select Submit Data, and then click Next.&lt;br /&gt;3) Select as an e-mail message, and then click Next.&lt;br /&gt;4) Delete all text in all textboxes on the window (you will be adding all of &lt;br /&gt;this content back in later using code). Click Next.&lt;br /&gt;5) On the next window enter a name into the textbox. Remember what you name &lt;br /&gt;it. Click Finish.&lt;br /&gt;&lt;br /&gt;you can write code as :&lt;br /&gt;Code in jscript:&lt;br /&gt;&lt;br /&gt;var objEmailAdapter = null;&lt;br /&gt;objEmailAdapter = XDocument.DataAdapters("&amp;lt;name of the Email dataconnetion&amp;gt;");&lt;br /&gt;objEmailAdapter.To = "list@example.com";&lt;br /&gt;objEmailAdapter.Subject = "Status Report";&lt;br /&gt;objEmailAdapter.Intro = "Name:" + XDocument.DOM.selectSingleNode("/my:myFields/my:Name").text+ "\n" +"Description: " +XDocument.DOM.selectSingleNode("/my:myFields/my:Description").text;&lt;br /&gt;objEmailAdapter.Submit();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Code in C#:&lt;br /&gt;&lt;br /&gt;IXMLDOMNode node = thisXDocument.DOM.selectSingleNode("&amp;lt;Xpath of the field1&amp;gt; ");&lt;br /&gt;			string value1 = node.text;&lt;br /&gt;&lt;br /&gt;IXMLDOMNode node = thisXDocument.DOM.selectSingleNode("&amp;lt;Xpath of the field2&amp;gt;");&lt;br /&gt;			string value2 = node.text;&lt;br /&gt;&lt;br /&gt;EmailAdapter oEmail = (EmailAdapter)thisXDocument.DataAdapters["&amp;lt;name of the Email dataconnetion&amp;gt;"];&lt;br /&gt;			oEmail.To = "";&lt;br /&gt;			oEmail.CC = "";&lt;br /&gt;			oEmail.Subject = "";&lt;br /&gt;			oEmail.Intro = value1 + value2;&lt;br /&gt;			oEmail.Submit();&lt;br /&gt;</description></item><item><title>Exporting InfoPath fields to a new task in Outlook</title><link>https://www.infopathdev.com:443/forums/thread/12892.aspx</link><pubDate>Thu, 08 Jun 2006 00:39:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12892</guid><dc:creator>mj02</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12892.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12892</wfw:commentRss><description>I haven't been working in InfoPath very long so hopefully you guys can help me.&lt;br /&gt;&lt;br /&gt;I have been working in InfoPath 2003 and am creating a form for my job that has some agenda information.   One of the sections deals with tasks and has fields like task description, due date, notes, etc.  &lt;br /&gt;&lt;br /&gt;My question is, is there a way (in code or otherwise) to have those task fields be exported to a new task in Outlook (Outlook 2003)?&lt;br /&gt;&lt;br /&gt;I've looked around and haven't found much in the way of help to do this.&lt;br /&gt;&lt;br /&gt;My script file for the template is in Jscript (it has a .js extension).  I guess this is another question but how can I use VBscript for the form's script file instead of JScript?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks,  &lt;br /&gt;Matt</description></item></channel></rss>