File attachment from infopath to sharepoint

A

Amod

Hello all,
I have a InfoPath 20023 form that submits the data to SharePoint library.
Want to use file attachment control in the form, is there a way to map this
attachment with the attachment column in the sharepoint library and/or list?

Thanks
 
B

Ben Walters

Hey Amod,
I like the way you think however there is no easy way to map these 2
columns, this is mainly due to the way InfoPath stores the attachment in the
form. The attachment is stored as a base64 encoded string, in addition to
the file contents this string also contains the file name and file size.
The following link illustrates how to get access to this file using code
http://support.microsoft.com/kb/892730

While this doesn't solve your question directly you could probably use this
code in a web service to decode the attachment and then upload the file to
SharePoint attached to the new list item. While there is probably a bit of
coding grunt work involved in this approach I don't see any reason
technically why it wouldn't be possible

Hope this helps

Cheers
Ben Walters
 
B

Ben Walters

Hey Amod,
Sorry for the delayed response, the dev toolkit for 2005 is included as part
of the Visual Studio Tools for Office VSTO, if you have and MSDN
subscription you should be able to find it there.

Cheers.
Ben Walters
 

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