<?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>Re: Copy form keeps the same URL as original</title><link>https://www.infopathdev.com:443/forums/thread/35258.aspx</link><pubDate>Thu, 04 Dec 2008 05:54:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35258</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35258.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35258</wfw:commentRss><description>&lt;p&gt;Hello Welcome to the Forums,&lt;/p&gt;
&lt;p&gt;Here is the code you have to change as below,&lt;/p&gt;
&lt;p&gt;Set fc = Application.XDocuments.NewFromSolutionWithData(objURL.Text, objURI.Text) &lt;/p&gt;
&lt;p&gt;to &lt;/p&gt;
&lt;p&gt;Set fc = Application.XDocuments.NewFromSolutionWithData(varXMLData, varSolutionURI, dwBehaviour) &lt;/p&gt;
&lt;p&gt;varXMLData -&amp;gt; XMLDocument type of data&lt;/p&gt;
&lt;p&gt;varSolutionURI -&amp;gt; URI of the solution&lt;/p&gt;
&lt;p&gt;dwBehaviour -&amp;gt; By default it is 1.&lt;/p&gt;
&lt;p&gt;If you want new solution form then code is here,&lt;/p&gt;
&lt;p&gt;Set fc = Application.XDocuments.NewFromSolution(varSolutionURI)&lt;/p&gt;</description></item><item><title>Copy form keeps the same URL as original</title><link>https://www.infopathdev.com:443/forums/thread/35233.aspx</link><pubDate>Wed, 03 Dec 2008 19:18:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35233</guid><dc:creator>cdflip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35233.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35233</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m having to fix someone else&amp;#39;s code. Here is the basics, after you submit the original form, you can go to that form and click on Copy button to get a replica of that form. Then you go and change whatever you need and submit it. Right now when you get the email stated that it has been submitted, it&amp;#39;s using the original form&amp;#39;s URL. So when you click on it, you&amp;#39;re going to the original and not the copy one.&amp;nbsp; Here is the code behind the Copy Button: &lt;/p&gt;
&lt;p&gt;Sub btnCopyForm_OnClick(eventObj)&lt;/p&gt;
&lt;p&gt;Dim err&lt;/p&gt;
&lt;p&gt;&amp;#39;Create the form copy.&lt;/p&gt;
&lt;p&gt;Set fc = Application.XDocuments.NewFromSolutionWithData(objURL.Text, objURI.Text) &lt;/p&gt;
&lt;p&gt;On Error Resume Next &lt;/p&gt;
&lt;p&gt;If err.number &amp;lt;&amp;gt; 0 Then&lt;/p&gt;
&lt;p&gt;Call MsgBox(err.Description,64,&amp;quot;Error on creation of copy&amp;quot;) &lt;/p&gt;
&lt;p&gt;err.clear &lt;/p&gt;
&lt;p&gt;End If&lt;/p&gt;
&lt;p&gt;&amp;nbsp;End Sub&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>