<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Excel Value to Infopath Field</title><link>https://www.infopathdev.com:443/forums/thread/97096.aspx</link><pubDate>Tue, 22 Apr 2014 06:45:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97096</guid><dc:creator>icantmath</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97096.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=97096</wfw:commentRss><description>I&amp;#39;ve searched...and I&amp;#39;ve googled. I have an infopath form that I&amp;#39;d like to fill out certain fields from excel. The form is used as an approval response. I can get it to open just fine by creating an infopath object in vba. Now, i want to set field10 to be a value from an index in an array. Please help. Also, this form has a repeating table. I&amp;#39;d like to dynamically fill it out as well and add rows and such. Thank you in advance. I&amp;#39;m very new to infopath.


Sub infForm()
    Dim infopathApp As Object
    Set infopathApp = CreateObject(&amp;quot;InfoPath.Application&amp;quot;)
        infopathApp.XDocuments.NewFromSolution (&amp;quot;C:\Users\b\Desktop\thisApproval.xsn&amp;quot;)
            infopathApp.SelectSingleNode(&amp;quot;/dfs:my:myFields/my:field10&amp;quot;).Value = &amp;quot;Test&amp;quot;
            &amp;#39;infopathApp.getdom(&amp;quot;form1&amp;quot;).SetProperty (&amp;quot;group2&amp;quot;)
End Sub

Opens up the infopath document just fine.</description></item></channel></rss>