Opening old forms in a new template - InfoPath Dev
in

InfoPath Dev

Opening old forms in a new template

Last post 09-20-2005 12:31 AM by potpourri. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-15-2005 02:16 PM

    Opening old forms in a new template

    I have forms that are plain-ole XML files.

    I've made some trivial changes to my template. All I really did was run regform to create an MSI. This is how I ran regform:
    C:\> regform /T Yes /MSI XTemp.xsn


    I ran the resulting MSI and installed the template in the default directory.

    I modified one of my forms so that it would point to the freshly (locally) installed template. [Sharing a template over HTTP isn't going to be an option for my scenario. ...Hence the MSI.]
    in the <?mso-infoPathSolution> tag, I changed:
    href="http://wabelhdk0144667/webshare/xmltemplating.xsn"
    to:
    href="file://C:\Program Files\InfoPath Form Templates\XTemp.xsn"


    Now when I go to open the form it says:
    InfoPath cannot open the following file: MyTest.xml.
    Catastrophic failure


    Me and the guys in the office had a good laugh about that error message, but nobody can guess what to do about it.




    My goal here is quite simple and maybe I'm going about it all wrong. All I need to do is make these existing xml files open in the template that I just installed from my MSI. If I have to redo something, that's fine. I just need a reliable process to make it work at all.

    TIA,

    -Mark
  • 09-15-2005 02:43 PM In reply to

    Re: Opening old forms in a new template

    Hi Mark,
    Welcome to the Forum!
    Can you do one thing, fill out a form with the newly installed XSN save the xml and compare your old forms with the new one, mainly PI. Look for the differences...

    Please post back if you find any difference between the old file and the new file.

    Agni
    InfoPath Dev India
  • 09-15-2005 03:32 PM In reply to

    Re: Opening old forms in a new template

    Wow! great idea. Man, I'm so burnt-out I didn't think of that. Thanks for setting me straight.

    I've been doing InfoPath for just a week and I'm finding plenty of challenges.

    Tag from my new template:
    <?mso-infoPathSolution 
    solutionVersion="1.0.0.1"
    productVersion="11.0.6357"
    name="urn:schemas-microsoft-com:office:infopath:XTemp:-myXSD-2005-09-09T23-16-41"
    PIVersion="1.0.0.0" ?>


    Tag from the old template:
    <?mso-infoPathSolution 
    solutionVersion="1.0.0.16"
    productVersion="11.0.6357"
    PIVersion="1.0.0.0"
    name="urn:schemas-microsoft-com:office:infopath:xmltemplating:"
    href="http://wabelhdk0144667/webshare/xmltemplating.xsn" ?>


    So all I do is replace this tag in my existing XML and it's all good again. I tried it and it works. There's a few differences in there, so I'm not sure where the showstopper sits, but I'm not advanced enough to understand it yet.

    Thanks,
    -Mark
  • 09-18-2005 08:15 PM In reply to

    Re: Opening old forms in a new template

    i've having the same issue here but can't be solved by simply modiying the form tag one by one since there are like 400+ forms in the library.

    a friend had tried running a script to modify the tag, and it seemed work fine a while, and after that the forms need to be relinked again to the new template.

    i notice we could modify the tag's SelectionNamespace using the XDocument.DOM.setProperty.

    could we achieve a similar result for modifying the template URI using code?
  • 09-19-2005 11:17 PM In reply to

    Re: Opening old forms in a new template

    Hi Mark,
    When you run regform it removes the href and effectively makes your template a URN based one so it doesn't expect the href even though it points to the solution. Using the URN is the trick.

    Hi Potpourri,
    We have a tool to allow you to quickly batch modify forms. It's called InfoPath Dev Bulk Edit tool and you can find it athttp://www.infopathdev.com/webstore/detail.aspx?itemid=15. I'm not sure if it will work for the PI, but you should give it a try and if it doesn't, we can fix it so it does. Another option would be to use Find and Replace in files inside of Visual Studio and search and replace in all files automatically. Good luck!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 09-20-2005 12:31 AM In reply to

    Re: Opening old forms in a new template

    thanks for the suggestion Patrick, would try updating via the VS suite :)
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.