다음을 통해 공유


Open and copy contents from one form to another in InfoPath 2003

Opening a new form from another form in InfoPath is not a straight forward task. If the form is published to a SharePoint document library, we can invoke it by launching it through the browser. If it is published at a network share, you can launch it as an application from your code.

 

The problem starts if we have to pass parameters to the form. Say, if we need to fill some controls on the form, we cannot pass the parameters as command line for the forms published to network share nor can we pass parameters as querystring for the ones published to SharePoint.

 

There are several ways in which you can pass parameters to InfoPath forms. Couple of them includes using XML file to store the details and while loading the new form, reading and populating from that file, using script file to launch and fill parameters to InfoPath (though this apparently has some drawbacks when forms are published to SharePoint).

 

I’ve a simple solution to this in the attached sample, which will allow passing parameters from one InfoPath form to another using the Interop API’s provided with InfoPath SDK.

 

You’ve to publish the parent form to C:\parent.xsn and child form to C:\Child.xsn to run it out of the box.

OpenNewForm.zip

Comments