<?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>pass form field reference into variable</title><link>https://www.infopathdev.com:443/forums/thread/73041.aspx</link><pubDate>Fri, 16 Dec 2011 20:12:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73041</guid><dc:creator>s2cawade</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73041.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73041</wfw:commentRss><description>&lt;p&gt;Hello, I&amp;#39;m new to programming infopath solutions.&amp;nbsp; I have a form field that (by formula) builds a network directory path. I have a button and OnClick event that should take the string value of the directory path field, create the directory and then open it so the user can drag and drop supporting documents to the new folder.&amp;nbsp; The string path is maintainded (along with all other fields) in an access database so that another group can review the documents.&amp;nbsp; I have started on the code behind the button but am very new to Infopath.&amp;nbsp; Any advice would be helpful but I need help understanding how to pass the&amp;nbsp;form field&amp;nbsp;as string value into my createobject and then open the created file path (was thinking about a do command for this part)?&lt;/p&gt;
&lt;p&gt;Sub CTRL113_7_OnClick(eventObj)&lt;br /&gt;var oField1 = eventObj.Source.selectSingleNode(&amp;quot;my:@File_Path3&amp;quot;);&lt;br /&gt;&amp;nbsp;oField1.text = strFolder;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;set objFSO = createobject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;/p&gt;
&lt;p&gt;if objFSO.FolderExists(strFolder) = False then&lt;br /&gt;&amp;nbsp;objFSO.CreateFolder strFolder&lt;br /&gt;&amp;nbsp;MsgBox(&amp;quot;Folder was created&amp;quot;)&lt;br /&gt;else&lt;br /&gt;&amp;nbsp;MsgBox(&amp;quot;Folder was not created&amp;quot;)&lt;br /&gt;end if&lt;br /&gt;End Sub&lt;/p&gt;</description></item></channel></rss>