Wednesday, May 30, 2012

Some "Document ID" are not generated

After copying some MS Office files from local drive to SharePoint, I am surprised that some files don't have "Document ID" populated.  It's empty, and I cannot update any field for these files!

In SharePoint log, I got the error message below:

Unable to update the information in the Microsoft Office document DocumentLibraryName/FileName.xls.



System.Runtime.InteropServices.COMException: Unable to update the information in the Microsoft Office document  DocumentLibraryName/FileName.xls.   
 at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)    
 at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)


Strange. I guess there is some kind of conflicts which prevented any update of the fields.

After 20 minutes of searching, luckily I noticed the comments from Lennin in the link below:

http://mqsharepoint.blogspot.com.au/2007/06/exception-0x81071003-unable-to-update.html

Edit the document, (in Office 2003) Go to File, Properties, Custom Properties then choose any property like client and type any value, then click add then close the dialog and save the document. After this you should be able to upload/save the document in the document library without problems.


Lennin is right.  The problem is there is a custom property in those files, which conflicts with a field in the document library with same name.  After removing that property from the files, everything goes well.

No comments:

Post a Comment