<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Copy attachments form SharePoint List to InfoPath Form</title><link>https://www.infopathdev.com:443/forums/thread/69428.aspx</link><pubDate>Fri, 19 Aug 2011 08:19:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69428</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69428.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=69428</wfw:commentRss><description>&lt;p&gt;Hello Aerial11,&lt;/p&gt;&lt;p&gt;I guess you have a valid URL for your document which you will attach to your Infopath form. Then you can accomplish this in two steps. In the first step you have to &amp;quot;stream&amp;quot; the file from your document library and in the second step you attach this &amp;quot;stream&amp;quot; to the attachment control in the form... &lt;/p&gt;&lt;p&gt;Even though I have not a complete example but I have a few lines of code which will help you to get started.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Extract a file from a document library:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;SPSite site = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSite(&lt;span class="str"&gt;&lt;a href="http://YourServer/YourSite"&gt;http://YourServer/YourSite&lt;/a&gt;&lt;/span&gt;);&lt;br /&gt;SPWeb web = site.OpenWeb();&lt;br /&gt;&lt;br /&gt;SPFile file = web.GetFile(&lt;span class="str"&gt;@&lt;a href="http://YourServer/YourSite/YourDocLibrary/Document.doc"&gt;http://&lt;u&gt;&lt;font color="#0066cc"&gt;YourServer/YourSite&lt;/font&gt;&lt;/u&gt;/YourDocLibrary/Document.doc&lt;/a&gt;&lt;/span&gt;);&lt;br /&gt;System.IO.StreamReader str = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.IO.StreamReader(file.OpenBinaryStream());&lt;br /&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;&lt;font face="arial,helvetica,sans-serif"&gt;&lt;strong&gt;Attach (=Encode the file) to your file attachment control&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font face="courier new,courier"&gt;&lt;/font&gt;&lt;p&gt;&lt;a href="http://support.microsoft.com/kb/2517906"&gt;http://support.microsoft.com/kb/2517906&lt;/a&gt;&lt;/p&gt;&lt;p&gt;With the encoder class in this article you can use the &amp;#39;stream&amp;#39; from step 1 to add the file to your infopath form.&lt;/p&gt;&lt;p&gt;Hope you will find useful tips&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;</description></item><item><title>Copy attachments form SharePoint List to InfoPath Form</title><link>https://www.infopathdev.com:443/forums/thread/69165.aspx</link><pubDate>Wed, 10 Aug 2011 18:45:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69165</guid><dc:creator>Aerial11</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69165.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=69165</wfw:commentRss><description>&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am trying to extract attachments form SharePoint list to the infopath browser form. I found lots of article on how to copy attachments form Form to the SharePoint list but not form List to the form. I would greatly appreciate any help on this. Thank you in advance.&lt;/p&gt;</description></item></channel></rss>