Opening a Infopath 2007 form in design mode c# - InfoPath Dev
in

InfoPath Dev

Opening a Infopath 2007 form in design mode c#

Last post 01-06-2009 06:01 AM by Chakan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-05-2009 11:13 AM

    • Chakan
    • Not Ranked
    • Joined on 12-22-2008
    • Posts 7

    Opening a Infopath 2007 form in design mode c#

    Hi 

     I need to know how to open an .xsn form from visual studio 2005 in infopath 2007 but it must open in design mode. I don't want to go to tool and click design this form.

     Currently I am opening the form like this:

     

                ApplicationClass app = new ApplicationClass();
                app.XDocuments.NewFromSolution(@"c:\MyForm.xsn");

    Any help would be appreciated.

  • 01-06-2009 02:23 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Opening a Infopath 2007 form in design mode c#

    Hello,

    We don't have option to open MyForm.xsn file in design mode using code. If you want we have to open using tools and design form. Otherwise we can open directly MyForm.xsn in design mode using right click -> Design.

    If we try to open using below code it will open .xml file,

    Application.XmlForms.NewFromFormTemplate(@"C:\MyForm.xsn");

  • 01-06-2009 06:01 AM In reply to

    • Chakan
    • Not Ranked
    • Joined on 12-22-2008
    • Posts 7

    Re: Opening a Infopath 2007 form in design mode c#

     Hi Shiva

     Thanks for the reply. I don't think it's possible to do what this company wants me to do.

    They want a base infopath template where people have a block of code that others can go in and add their own buttons and text boxes and whatnot and compile it all and then save it on the server. But they want to control this all through C#. 

    Not sure it's possible if you can't open the form in design mode. Guess I will just have to suggest to them that they must update the file and then upload that file to the server via C#.

     Will look for some other solution then

    Thanks

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.