infopath how do you copy a form?

I have an infopath form that I am working on with code behind.  I want to make a copy and work on that.  When I copy and paste it to another directory, then open it, I get an error: "This form template was published to one location and has been saved or moved to a different location.  To ensure that forms based on this template work correctly, publish the template again."

Who is Participating?
Clay FoxConnect With a Mentor Director of Business IntegrationCommented:
Allt emplates must be published for them to be utilized and completed.

Best Practice is you have a local copy of the template that you use for design and future modifications.

Then use the publish wizard in design mode to publish it locally or to a central location.

During publishing the template location is set.
Every InfoPath XML document references the template since that is how it knows how to render the XML data. Thats the relationship between documents and templates.

So if you copy the template and try to open a form from it without publishing you get the error above. Since the path in the form does not reference the template location.

You have to have access to the published location or at least enter the path that the users will reference it at. This can be set in the publish wizard.  Then copy it to the location you embedded in it.
jackjohnson44Author Commented:
So I would like to do two things:

1. be able to make a copy on my machine so I can work on either.

2. be able to copy a form to a server (to a directory I can't publish to) and use it there.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.