Creating InfoPath XML documents Programmatically - InfoPath Dev
in

InfoPath Dev

Creating InfoPath XML documents Programmatically

Last post 04-19-2007 08:28 AM by Giannis. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-16-2005 05:58 AM

    Creating InfoPath XML documents Programmatically

    Is is possible to create save an .xml form from an .xsn form template programmatically through code-behind? What I want to be able to do is allow the user to click on a link for a .xsn form template from a main document library and have it save an empty .xml form based on that template into another document library.
  • 03-09-2005 12:11 AM In reply to

    Re: Creating InfoPath XML documents Programmatically

    Hi MReyeros,
    I apologize for the delay in responding to you. Yes, you can definitely do this. Just make sure to include the InfoPath PI and other info when you create the XML. Then, you can stream it down to a browser and URLMON will intercept and start up InfoPath to load it. I believe that's what you want, but maybe I'm confused. Anyway, good luck.
    Patrick
    Patrick Halstead
    Project Manager at Qdabra
  • 04-17-2007 11:41 PM In reply to

    Re: Creating InfoPath XML documents Programmatically

    Hi

    How exactly can/did you extract the InfoPath PI from the xsn-template?

    Thanks!
    Giannis

  • 04-18-2007 01:01 AM In reply to

    Re: Creating InfoPath XML documents Programmatically

    You could also just call a Data Connection in your onload event which is set up to upload your form to a form library. As the name of the form (specified in the Data Connection Wizard) I would use datetime or something to make sure that you have always a unique name for your uploaded form. After that call the thisApplication.Close() method to directly close the form again if you want. Like this the user would click the link, the form would open shortly upload it self with a unique name to another sharepoint library and close again. To be honest I haven't tried this and am not sure if it will work....
    Listen to Motörhead cos they play Rock'n Roll :)
  • 04-19-2007 08:28 AM In reply to

    Re: Creating InfoPath XML documents Programmatically

    Thank you, Matti for your reply, but it's a (another) workaround. Currently, i have an empty form in the form lib, which is downloaded and filled in by a workflow.

    I'm looking for a way to retrieve this PI-header from the .xsn file.

     Thanks!

    Giannis

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