Publish Infopath form programmatically

R

Rick

I have been assigned the task of getting a template.xsn file from a
Sharepoint site, extract it, make changes to the files and recreate teh .xsn
file and move it back to Sharepoint. I have completed all the steps, the
problem I seem to be having is a way to publish the form back to Sharepoint
via .net Code.

Can anyone post some sample code to programmatically publish an Infopath
form to sharepoint?

Thanks in advance!
Rick
 
D

DracosTheBlack

You don't need to do it by code. Go to the sharepoint site where the
form is published click feel out this form. Then when in that view
click on tools design this form it will come up in design view. Make
the changes you want and then just click save it will save the template
back to the sharepoint site.
 
H

Henning Krause [MVP]

Hello,

I believe the publishing is done by using some sort of FrontPage Server
Extension RPC mechanism. Install a network monitor on your machine (like
Ethereal) and look what get transmitted to the Exchange Server. Should be
some form of HTTP POST command.

You can then implement a similar approach in your .NET Code.

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)
 
R

Rick

Thanks for the help, but we have several infopath forms to change and the
project was to process all the forms at once instead of opening each
individual one. I did get around this issue, it turned out to be a
filestream object that was saving the wrong files back to sharepoint
 
G

Greg Leizerowicz

I found the following solution by googling - thought I'd share for anyone
going through this:

The InfoPath team's blog details a script solution, but it can be done in
managed code as well (contact me for a quick and dirty version). See their 5
part solution at:
http://blogs.msdn.com/infopath/archive/2004/5/4.aspx
http://blogs.msdn.com/infopath/archive/2004/5/5.aspx
http://blogs.msdn.com/infopath/archive/2004/5/6.aspx
http://blogs.msdn.com/infopath/archive/2004/5/7.aspx

Very helpful for anyone bored with the publishing wizard interface. Thanks
"InfoPath Team", whoever you are!

HINT: Get the MS Cabinet Software SDK if you don't already have it:
http://support.microsoft.com/default.aspx?scid=kb;en-us;310618

(e-mail address removed) (replace 'spam' with 'bayada')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top