<?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: Help.. SaveAs Button infopath 2010 Variable "" asign</title><link>https://www.infopathdev.com:443/forums/thread/75945.aspx</link><pubDate>Thu, 01 Mar 2012 10:26:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75945</guid><dc:creator>dkanha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75945.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=75945</wfw:commentRss><description>Imports Microsoft.Office.InfoPath
Imports System
Imports System.Xml
Imports System.Xml.XPath

Namespace test
    Public Class FormCode
        &amp;#39; Medlemsvariabler understøttes ikke i webbrowseraktiverede formularer.
        &amp;#39; I stedet for kan du læse, skrive og læse disse værdier i FormState-
        &amp;#39; ordbogen ved hjælp af kode, som f.eks. følgende:
        &amp;#39;
        &amp;#39; Private Property _memberVariable() As Object
        &amp;#39;     Get
        &amp;#39;         _memberVariable = FormState(&amp;quot;_memberVariable&amp;quot;)
        &amp;#39;     End Get
        &amp;#39;     Set
        &amp;#39;         FormState(&amp;quot;_memberVariable&amp;quot;) = value
        &amp;#39;     End Set
        &amp;#39; End Property

        &amp;#39; BEMÆRK! Den følgende procedure kræves af Microsoft InfoPath.
        &amp;#39; Den kan redigeres ved hjælp af Microsoft InfoPath.
        Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup
            AddHandler DirectCast(EventManager.ControlEvents(&amp;quot;SaveAs&amp;quot;), ButtonEvent).Clicked, AddressOf SaveAs_Clicked
        End Sub


        Public Sub SaveAs_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
            Dim Xdocument As System.Configuration.Configuration

            Xdocument.SaveAs((&amp;quot;C:\&amp;quot;))
        End Sub

    End Class
End Namespace


It&amp;#39;s a test form where I only have one button  just to check the funktionality</description></item><item><title>Re: Help.. SaveAs Button infopath 2010 Variable "" asign</title><link>https://www.infopathdev.com:443/forums/thread/75933.aspx</link><pubDate>Thu, 01 Mar 2012 04:13:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75933</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75933.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=75933</wfw:commentRss><description>Can you paste in your complete code?</description></item><item><title>Re: Help.. SaveAs Button infopath 2010 Variable "" asign</title><link>https://www.infopathdev.com:443/forums/thread/75927.aspx</link><pubDate>Thu, 01 Mar 2012 02:25:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75927</guid><dc:creator>dkanha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75927.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=75927</wfw:commentRss><description>To Patrick..

a) I have directed &amp;quot;C\&amp;quot; to &amp;quot;C:\&amp;quot;..

b) I&amp;#39;ve also set the form as Full trusted..

This is the error I get!!

Object reference not set to an instance of an object.
   at test.FormCode.SaveAs_Clicked(Object sender, ClickedEventArgs e)
   at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
   at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)</description></item><item><title>Re: Help.. SaveAs Button infopath 2010 Variable "" asign</title><link>https://www.infopathdev.com:443/forums/thread/75877.aspx</link><pubDate>Wed, 29 Feb 2012 18:26:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75877</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75877.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=75877</wfw:commentRss><description>I can think of at least two things: a) the name &amp;quot;c\&amp;quot; is not correct and doesn&amp;#39;t resolve to a good file location, and b) you need to make sure your form&amp;#39;s security setting&amp;nbsp;is set to full trust to use this.</description></item><item><title>Help.. SaveAs Button infopath 2010 Variable "" asign</title><link>https://www.infopathdev.com:443/forums/thread/75789.aspx</link><pubDate>Tue, 28 Feb 2012 13:00:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75789</guid><dc:creator>dkanha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75789.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=75789</wfw:commentRss><description>What&amp;#39;s wrong with this code [Xdocument.SaveAs(&amp;quot;C\&amp;quot;)] =
Variable &amp;#39;Xdocument&amp;#39; is used before it has been assigned a value. A null reference exception could result at runtime.	






 Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup
            AddHandler DirectCast(EventManager.ControlEvents(&amp;quot;SaveAs&amp;quot;), ButtonEvent).Clicked, AddressOf SaveAs_Clicked
        End Sub


        Public Sub SaveAs_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
            Dim Xdocument As System.Configuration.Configuration

            Xdocument.SaveAs(&amp;quot;C\&amp;quot;)
        End Sub

    End Class
End Namespace</description></item></channel></rss>