<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Rich Text Control Question</title><link>https://www.infopathdev.com:443/forums/thread/24674.aspx</link><pubDate>Mon, 26 Nov 2007 11:17:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24674</guid><dc:creator>evilgenius</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24674.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24674</wfw:commentRss><description>&lt;p&gt;So I have been doing some more tests and am trying to use the scripting inside of the Infopath Form. I have an event that fires once the database query is done. This seems to work fine. I have the following vbscript code that I am using to just try to get the first part (name) inserted programmatically:&lt;/p&gt;
&lt;p&gt;Dim faname, faemail, faphone &lt;/p&gt;
&lt;p&gt;Dim oNode, oName, oEmail, oPhone, oAttr &lt;/p&gt;
&lt;p&gt;faname = XDocument.DOM.SelectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:Contracts/@FA_Name&amp;quot;).Text&amp;nbsp; &amp;#39;(These lines work!)&lt;/p&gt;
&lt;p&gt;faemail = XDocument.DOM.SelectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:Contracts/@FA_Email&amp;quot;).Text &lt;/p&gt;
&lt;p&gt;faphone = XDocument.DOM.SelectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:Contracts/@FA_Phone&amp;quot;).Text &lt;/p&gt;
&lt;p&gt;oNode = getNode(&amp;quot;//my:BlockDetail&amp;quot;)&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;oName = XDocument.DOM.createNode(1, &amp;quot;DIV&amp;quot;, &amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&amp;quot;) &lt;/p&gt;
&lt;p&gt;oAttr = XDocument.DOM.createNode(2, &amp;quot;title&amp;quot;, &amp;quot;&amp;quot;) &lt;/p&gt;
&lt;p&gt;oAttr.Text = faname &lt;/p&gt;
&lt;p&gt;oName.attributes.setNamedItem(oAttr) &lt;/p&gt;
&lt;p&gt;oNode.appendChild(oName)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The rich text box is not updating with this code and I still have not really found much to help me get this working...&lt;/p&gt;</description></item><item><title>Re: Rich Text Control Question</title><link>https://www.infopathdev.com:443/forums/thread/24595.aspx</link><pubDate>Wed, 21 Nov 2007 10:46:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24595</guid><dc:creator>evilgenius</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24595.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24595</wfw:commentRss><description>&lt;p&gt;This is driving me batty as I know I can not be the only one who wants to do this! I have not been lucky enough to find an example of what to do. I thought I would try to save the file and look at the xml structure which looks like this for the block I want:&lt;/p&gt;
&lt;p&gt;&amp;lt;my:BlockDetail&amp;gt;&amp;lt;div xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;Daniel&amp;#39;&amp;gt;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;Daniel&lt;/a&gt; Walker&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&amp;lt;a&lt;/a&gt; href=&amp;quot;&lt;a href="mailto:evilgenius@cox.net"&gt;evilgenius@cox.net&lt;/a&gt;mailto:evilgenius@cox.net&amp;quot;&amp;gt;evilgenius@cox.net&amp;lt;/a&amp;gt;&amp;lt;/div&lt;/a&gt;&amp;gt;&lt;br /&gt;&amp;lt;div xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;(757&amp;#39;&amp;gt;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;(757&lt;/a&gt;) 876-4783&amp;lt;/div&amp;gt;&amp;lt;/my:BlockDetail&amp;gt;&lt;/p&gt;
&lt;p&gt;My database connection is fine and I know the data is there. I want to programatically or somehow reproduce this structure when I change to the next record. I am familiar with some DOM, but in this case, I am using VBA code to generate the data for the block. I am not sure how to get this to work as I&amp;nbsp;can not find any example for it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is the code that I use to open Infopath:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Private Sub CommitSheet_Click()&lt;br /&gt;&amp;nbsp; Dim sel As String, adr As String, row As Variant, col As Variant&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; sel = CStr(CommitSheet.ActiveCell.Value)&lt;br /&gt;&amp;nbsp; adr = CStr(CommitSheet.ActiveCell.Address)&lt;br /&gt;&amp;nbsp; col = Left(adr, 2)&lt;br /&gt;&amp;nbsp; col = Replace(col, &amp;quot;$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;&amp;nbsp; row = Mid(adr, 3)&lt;br /&gt;&amp;nbsp; If col = &amp;quot;D&amp;quot; Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim x As Variant, y As Variant, ctype As Variant&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ipath As InfoPath.Application&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim xdocs As XDocuments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim xdoc As XDocument&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim node1 As Variant, node2 As Variant, node3 As Variant, node4 As Variant, node5 As Variant&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim node6 As Variant, node7 As Variant&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim div1 As Variant&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim hasNodes As Boolean&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctype = Mid(sel, 9, 4)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case ctype&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case &amp;quot;RCHK&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.MultiPage3.Value = 3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set ipath = CreateObject(&amp;quot;InfoPath.Application&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xdocs = ipath.XDocuments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set xdoc = xdocs.NewFromSolution(&amp;quot;&lt;a&gt;\\snnsvr010\C1200\C1200&lt;/a&gt; SHARED AREA\MFDB\contracts\2276.xsn&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xdoc.DOM.SelectSingleNode(&amp;quot;//dfs:myFields/dfs:queryFields/q:Contracts/@Document_Number&amp;quot;).Text = sel&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xdoc.Query&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....End Sub&lt;/p&gt;
&lt;p&gt;This works fine. And I have the record I want. I just need to take 3 fields and use&amp;nbsp;them to update the rich text control to the above code!!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Rich Text Control Question</title><link>https://www.infopathdev.com:443/forums/thread/24585.aspx</link><pubDate>Wed, 21 Nov 2007 02:07:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24585</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24585.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24585</wfw:commentRss><description>&lt;p&gt;Hi Dan&lt;/p&gt;
&lt;p&gt;Welcome to the wonder and the forum here.&lt;/p&gt;
&lt;p&gt;You would need to create the fields you needed in Infopath in the DOM. So a richtext field and what ever else you needed.&lt;/p&gt;
&lt;p&gt;You should be able to put the text into the field.&amp;nbsp; I can not remember how to pass the line feeds but I know it can be done.&lt;/p&gt;
&lt;p&gt;There are lots of resources here in the blogs from some of the top experts in InfoPath. Also Microsoft&amp;#39;s InfoPath site is another good resource.&lt;/p&gt;
&lt;p&gt;If you are using a backend database you may want to check out the Database Accelerator. &lt;a href="http://www.infopathdev.com/files/folders/dbxldownload/entry19957.aspx" target="_blank"&gt;Qdabra Database Accelerator Suite Version 2.1 - Developer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It makes working with data much easier&amp;nbsp;and more powerful by including&amp;nbsp;pre-built web services to use. These could be used with you VBA too.&lt;/p&gt;</description></item><item><title>Rich Text Control Question</title><link>https://www.infopathdev.com:443/forums/thread/24583.aspx</link><pubDate>Wed, 21 Nov 2007 01:10:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24583</guid><dc:creator>evilgenius</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24583.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=24583</wfw:commentRss><description>As this is my first post, let me just say that I have just stumbled upon the wonder that is Infopath. I have been developing a solution in Outlook 2003 that uses a VBA form to do a lot of stuff. It dawned on me that I could use it to open an infopath form using the newfromsolution and it does allow me to open the form and the form is connected to an Access database. I wanted to have an address block on the form that combined 3 to 6 fields together to form an address. I can use vba to determine if the fields have data and then create the address. I wanted to put this created address in a rich text box that had the name, city etc on a new line. It seems that I have to create a dom or something like that to get this to work. Are there any suggestions or examples out there somewhere. (By the way, this is not a web solution and runs strictly inside of a vba userform in Outlook)

Dan
evilgenius</description></item></channel></rss>