Submit form with attachment

M

Maurizio

I have form with document attachment.
Is it possible to submit this form in Form Library on Sharepoint and the
attached document in other Document Library in the same Sharepoint site,
automatically?
Thanks in advance
 
S

Scott Roberts [MSFT]

Well, it's possible but not exactly easy. The best way I can think to do
this is to handle the OnSubmitRequest event. In your event handler, you'll
need to extract the file attachment data and submit it to the SharePoint
list in code. I don't know enough about SharePoint to tell you how to
submit the extracted data using code. You might want to look at the
SharePoint SDK for that.

To extract the file attachment, this article will be helpful:
http://www.msdn.microsoft.com/libra...2003_ta/html/odc_infopath_attaching_files.asp.

Also, this article describes how to create file attachments
programmatically:
http://tips.serriform.com/CSharpCreateInfoPathAttachment.htm. You can
reverse the process to extract the files.

This will obviously require a lot of code.

- Scott
 

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