Problems with Hosting Infopath in windows forms - InfoPath Dev
in

InfoPath Dev

Problems with Hosting Infopath in windows forms

Last post 06-25-2007 05:37 PM by Shiraz Cupala. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-25-2006 12:04 AM

    • Bilal
    • Not Ranked
    • Joined on 08-13-2006
    • Posts 4

    Problems with Hosting Infopath in windows forms

    hi all,
    im hosting an infopath form in a .NET windows app.

    and im having trouble re-openning a form once i close it the code is pretty simple:

    formControl1.NewFromFormTemplate("C:\\MonitorDirectory\\MyTemplate.xsn");
    formControl1.XmlForm.Close();
    formControl1.NewFromFormTemplate("C:\\MonitorDirectory\\MyTemplate.xsn");
    formControl1.XmlForm.Close();

    the form open fine the first time, but when i open the same form again
    it says:
    infoPath cannot create a blank new form. infoPath cannot open the form because another version of the form template is currently open.

    if i open "someform.xsn" and close it,
    and then open "someotherform.xsn" it works.
    then if i open "someform.xsn" again it'll say that another version is
    already open

    basically i can open each template only once.

    any help is appreciated
  • 10-12-2006 10:33 PM In reply to

    Re: Problems with Hosting Infopath in windows forms

    I know this isn't ideal but to narrow the issue... Instead of just closing the form, what happens if you close the InfoPath instance. Does that work?
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-25-2007 03:29 PM In reply to

    Re: Problems with Hosting Infopath in windows forms

    Hi All,

     

    Is there any solution that you have find.

     

    If yes, Please let me knoe. I am getting the same problem.

  • 06-25-2007 05:37 PM In reply to

    Re: Problems with Hosting Infopath in windows forms

    There are 2 avenues I would try on this:

    1) Try deploying the form to a web site and launching new form template to that one. Locally deployed solutions sometimes behave oddly.

    2) Trying to launch immediately after close may be failing due to a timing issue? Maybe put time between.

    3) Try making your form an installed MSI type form and then launch it using the URN method.

     Thanks, Shiraz

     

    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.