<?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: InfoPath and Outlook Integration - Can't set Body correctly</title><link>https://www.infopathdev.com:443/forums/thread/91769.aspx</link><pubDate>Tue, 30 Jul 2013 13:08:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91769</guid><dc:creator>Psichiboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91769.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=91769</wfw:commentRss><description>Hi Patrick,

Thanks for the reply. Yeah, it was set up that way previously, however they wanted the ability to attach files to the email as it was being sent. I actually ended up figuring it out! When using the mailitem, there&amp;#39;s a property called HTMLBody. So when I did mailitem.HTMLBody = RichTextBox it created my email with perfect formatting. 

Thanks again,
Chris</description></item><item><title>Re: InfoPath and Outlook Integration - Can't set Body correctly</title><link>https://www.infopathdev.com:443/forums/thread/91684.aspx</link><pubDate>Sun, 28 Jul 2013 05:24:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91684</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91684.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=91684</wfw:commentRss><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;Why not just create a view that is used for the email and sending that as part of the data connection? That option is available out of the box. &lt;/p&gt;
&lt;p&gt;You don&amp;#39;t have to write code or launch Outlook and try to automate the sending. Just do it using out-of-the-box features.&lt;/p&gt;
&lt;p&gt;Kindly,&lt;/p&gt;</description></item><item><title>Re: InfoPath and Outlook Integration - Can't set Body correctly</title><link>https://www.infopathdev.com:443/forums/thread/91683.aspx</link><pubDate>Sun, 28 Jul 2013 05:23:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91683</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91683.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=91683</wfw:commentRss><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;Why not just create a view that is used for the email and sending that as part of the data connection? That option is available out of the box. &lt;/p&gt;
&lt;p&gt;You don&amp;#39;t have to launch Outlook and try to automate the sending. Just do it using out-of-the-box features.&lt;/p&gt;
&lt;p&gt;Kindly,&lt;/p&gt;</description></item><item><title>InfoPath and Outlook Integration - Can't set Body correctly</title><link>https://www.infopathdev.com:443/forums/thread/91611.aspx</link><pubDate>Thu, 25 Jul 2013 03:09:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91611</guid><dc:creator>Psichiboy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91611.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=91611</wfw:commentRss><description>I&amp;#39;m working with IP2010 (rich client) and I have a need to open Outlook prior to sending an email. I have a view that mimics a new email message like in Outlook and it has fields for To, CC, Subject and Body. My Body field is a rich text box that I&amp;#39;m populating based on an XML file (I have email templates that set what shows up in the body of the email message). 

I have the XML data connection populating correctly and I&amp;#39;ve written the code to open Outlook successfully and I can pass in the information from my view into the mail message. However, I cannot get the Body field to set correctly. My body field in the view contains multiple paragraphs, but when I send it to Outlook, it&amp;#39;s removing the paragraph breaks so I&amp;#39;m left with one long paragraph. I&amp;#39;ve tried setting the field with the InnerXML and OuterXML and even Value. I&amp;#39;ve tried setting the Body in the email message as HTML and Rich Text, but neither are working. 

Here is my code that I&amp;#39;m working with:
Dim myNamespace As String = NamespaceManager.LookupNamespace(&amp;quot;my&amp;quot;)
Dim nav1 As XPathNavigator = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:LeaseFlow/my:EmailBody&amp;quot;, NamespaceManager)
Dim nav2 As XPathNavigator = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:LeaseFlow/my:EmailHeader&amp;quot;, NamespaceManager)
Dim emailmessage As String
Dim taskname As String, SentTo As String, Subject As String, CC As String, BCC As String

emailmessage = nav1.SelectSingleNode(&amp;quot;my:emailbodyMessage&amp;quot;, NamespaceManager).InnerXML

SentTo = nav2.SelectSingleNode(&amp;quot;my:emailheaderTo&amp;quot;, NamespaceManager).Value
Subject = nav2.SelectSingleNode(&amp;quot;my:emailheaderSubject&amp;quot;, NamespaceManager).Value
CC = nav2.SelectSingleNode(&amp;quot;my:emailtoCC&amp;quot;, NamespaceManager).Value
BCC = nav2.SelectSingleNode(&amp;quot;my:emailtoBCC&amp;quot;, NamespaceManager).Value

Dim oApplication As Microsoft.Office.Interop.Outlook._Application = New Microsoft.Office.Interop.Outlook.Application
Dim newMail As Microsoft.Office.Interop.Outlook.MailItem = oApplication.CreateItem(OlItemType.olMailItem)

newMail.BodyFormat = OlBodyFormat.olFormatHTML
newMail.To = SentTo
newMail.Subject = Subject
newMail.Body = emailmessage
newMail.CC = CC
newMail.BCC = BCC
newMail.Display(False)
--------------------------------------------------------------------

Can anyone help me out please? I&amp;#39;m seriously stuck. 

Thank you in advance!
Chris</description></item></channel></rss>