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
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/library/default.asp?url=/library/en-us/odc_ip2003_
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
>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