SharePoint: Setting meta data properties whilst adding a file to a doc library programmatically

Just a quick note…

I have a versioning document library in SharePoint 2003, and am trying to upload documents to it programmatically. Unfortunately, the only way to set some meta data properties is to update the associated splistitem properties once the file is uploaded. The problem with this is that it generates two entries in the version history (before and after the meta data properties have been set).

I have reflected the SharePoint dll and it looks like there is an overload for adding meta data properties when a file is uploaded that is not accessible. Note that in WSS 3 / SharePoint 2007 a method does seem to be accessible – see http://www.sharepointblogs.com/vandest/archive/2006/11/20/16262.aspx.
Note that when a document is uploaded via the standard SharePoint upload document form, meta data properties can be set without generating two separate versions.

I would be really interested to here if anyone has a solution to this (other than deleting versions).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>