Freigeben über


Programmatically Launching Another Form from Within a Form

Application.XDocuments.NewFromSolution(urlToXsnFile) or Application.XDocuments.Open(urlToXmlFile)

 

Your form will need to require full trust in order to use either of these OM methods.

 

Keep it simple, right?

Tim

Comments

  • Anonymous
    August 12, 2006
    Hey,

    I've been doing it this way for a while in JScript, with the InfoPath 2k3 Object Model.  Currently, we are trying to move to C# and the InfoPath 2007 MOM (at the same time), and I wanted to know if you know of the alternative for this procedure?

    Josiah Smith

    P.S.: I've found that if you use http status codes and are programatically detirmining the filename of the new form you are opening, you can detirmine if you need to open a new form, or if you can open a previously saved form.
    The reason I've had to do it that way is because there is a small bug in InfoPath 2007 where using a submit with a comma in the filename turns that comma into an underscore, but we were able to circumvent that by using the http submition.  Don't know if that helps you at all, but its something I've learned.