<?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: Attachment Field - adding read-only file</title><link>https://www.infopathdev.com:443/forums/thread/47186.aspx</link><pubDate>Sun, 20 Sep 2009 15:07:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47186</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47186.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=47186</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You seem to have a misunderstanding of what the term &amp;quot;Read-only&amp;quot; means and what the Read-only file attribute does.&lt;/p&gt;&lt;p&gt;If you save the form as its source files, you can modify the manifest.xsf file to remove the &lt;b&gt;Save as...&lt;/b&gt; option from the context menu:&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;&amp;nbsp;&amp;nbsp; &amp;lt;xsf:button action=&amp;quot;xFileAttachment::saveAs&amp;quot; xmlToEdit=&amp;quot;field1_1&amp;quot; caption=&amp;quot;&amp;amp;amp;Save As...&amp;quot; showIf=&amp;quot;immediate&amp;quot;&amp;gt;&amp;lt;/xsf:button&amp;gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt; but I don&amp;#39;t think that will stop anyone from opening the .msg file in Outlook and saving it from there.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Attachment Field - adding read-only file</title><link>https://www.infopathdev.com:443/forums/thread/47175.aspx</link><pubDate>Sun, 20 Sep 2009 14:06:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47175</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47175.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=47175</wfw:commentRss><description>&lt;p&gt;I was going to suggest that you deselect the checkbox on the file attachment control that says &amp;quot;Allow user to browse, delete and replace files&amp;quot; but I see the contextual Save As menu is still there. I&amp;#39;m not sure of a way to prevent users from saving a file attachment locally....&lt;/p&gt;</description></item><item><title>Attachment Field - adding read-only file</title><link>https://www.infopathdev.com:443/forums/thread/47098.aspx</link><pubDate>Thu, 17 Sep 2009 13:55:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47098</guid><dc:creator>cwelsh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47098.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=47098</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Basically i have a very simple scenario, i have an email on my hard drive called test1.msg.&amp;nbsp; I want to add this file to an attachment control (theattachmentnode2)&amp;nbsp;which i&amp;#39;ve done through the below code:&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; theAttachmentNode2 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; XPathNavigator = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:group46/my:field134&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&amp;#39;&amp;#39;Get a reference to the filename node. &lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; fileName1 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;c:\test1.msg&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; fileName1.Length &amp;gt; 0 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&amp;#39;Encode the file and assign it to the attachment node. &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myEncoder &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; InfoPathAttachmentEncoding.InfoPathAttachmentEncoder(fileName1)&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;theAttachmentNode2.SetValue(myEncoder.ToBase64String()) 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;font color="#000000"&gt;The issue is, that i have made the .msg file read-only because i don&amp;#39;t want people to be able to save the email wherever they want but it appears the read-only attribute doesnt carry over when the email gets attached to the form.&amp;nbsp; Any suggestions?&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item></channel></rss>