Hi guys,
I've got a form library to which an InfoPath form is associated as a content type. To meet the business requirements, I have to exclude all "save" buttons so that users cannot save their forms (the content of the forms is outsourced in Sharepoint Lists). Now, there is some workflow which needs to make a copy of the template (like: an instance of it) and save it somewhere. If it was only to copy an existing document, it would be easy. But how can I programmatically generate a copy from a template? It is impossible for me to create it manually, as the form can't be saved by some button. So the often seen create-a-first-instance-and-copy-its-XML-scheme method does not apply.
It should go like this (but I'm open to other ways!):
1) Getting the XSN file as SPFile (easy)
2) Extracting its template.XML file (how???)
3) uploading template.xml to a library, under a new name; check in etc. (easy).
Some ideas? Thx!