<?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: C# code to open network file browser form</title><link>https://www.infopathdev.com:443/forums/thread/92888.aspx</link><pubDate>Mon, 09 Sep 2013 15:12:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92888</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92888.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=92888</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;A URL (link) would open on the user&amp;#39;s machine. Not sure what you could do to make the file read only - perhaps put the file in a SharePoint library and use permissions there?&lt;/p&gt;</description></item><item><title>Re: C# code to open network file browser form</title><link>https://www.infopathdev.com:443/forums/thread/92853.aspx</link><pubDate>Sun, 08 Sep 2013 22:03:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92853</guid><dc:creator>arkainus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92853.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=92853</wfw:commentRss><description>Thank you for your response. Do you mind showing me a simple example? Ideally I would like my users who aren&amp;#39;t inputting the data to only view the file, not be able to change it at all (i have 2 views already set on the form). You&amp;#39;re sure it would work even when running from the server? I&amp;#39;m not at work at the moment and sorry if these questions seem extraordinarily noobish...</description></item><item><title>Re: C# code to open network file browser form</title><link>https://www.infopathdev.com:443/forums/thread/92850.aspx</link><pubDate>Sun, 08 Sep 2013 21:51:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92850</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92850.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=92850</wfw:commentRss><description>&lt;p&gt;Why not just insert a link to the specific file on the InfoPath form. Then, the users can click the link and open the file. Easy, no code or full trust needed.&lt;/p&gt;
&lt;p&gt;:)&lt;/p&gt;</description></item><item><title>C# code to open network file browser form</title><link>https://www.infopathdev.com:443/forums/thread/92715.aspx</link><pubDate>Wed, 04 Sep 2013 06:15:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92715</guid><dc:creator>arkainus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92715.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=92715</wfw:commentRss><description>Hi,

I had a question that I&amp;#39;m wondering is possible. I wanted to be able to have a button on a form that opens a specific file on a network drive. The network drive path is all specified through group policy, so everyone will have it mapped the same way (P:\ drive in this instance). I had created a view in one field that would allow the data input person to input the file path of the file specified in, and on another view, I created a button to open the file via the default application. I deployed the form via full trust and published to my SharePoint site. For reference, the code behind the button is below (pretty simple):
&lt;p&gt;
        &lt;code&gt;public void CTRL2_5_Clicked(object sender, ClickedEventArgs e)&lt;p&gt;
        {&lt;p&gt;
            &lt;p&gt;// Write your code here.
            &lt;p&gt;XPathNavigator nav = MainDataSource.CreateNavigator();
            &lt;p&gt;string fieldValue = nav.SelectSingleNode(&amp;quot;//my:myFields/my:field1&amp;quot;, NamespaceManager).Value;
&lt;p&gt;
            &lt;p&gt;System.Diagnostics.Process.Start(fieldValue);
        &lt;p&gt;}
&lt;/code&gt;
&lt;p&gt;
If I run this in infopath filler it works great. However, I&amp;#39;ve come to realize as I&amp;#39;m chasing down errors that the code is executed from the server and even if a valid file is inputted from the server&amp;#39;s point of view, the file will not actually open on the users computer. Is there a better way to achieve what I am looking for here? I want to make working with this form as EASY as possible in order to drive adoption of this through my company, so I thought the button solution would be great. Rolling out infopath filler to everyone in my environment is not a realistic option. Does anyone have a bead one a work-around, or see what I am missing? If I am going about this in the wrong manner I&amp;#39;m open to any suggestions (i.e. is it possible to attach the file I want to open via button to the sharepoint form, and open it with one button push that way?, etc.). I would greatly appreciate any help anyone can offer in this regard. I am sorry for the formatting on this post, I am unclear how to format here, and unfortunately was unable to find a topic pointing me in the right direction. Thank you in advance for your time.</description></item></channel></rss>