I'm creating a document programmatically on the server side and using SPFileCollection.Add(...) to create it using the binary contents and a hashtable of the metadata properties.
This works great in SharePoint. The SharePoint list item picks up the metadata properties and a new document item is created in the library with the proper metadata for all of the fields. If I view the properties or go to edit the properties
in SharePoint, all of the metadata is correct.
However, when I open the document in Word, it seems that none of the managed metadata fields (taxonomy field types) "stick". The values are only for the managed metadata fields.
In SharePoint, if I change any of the fields and do a save on the list item and then open the document, the taxonomy fields "stick" when I open the document again.
I've opened up the document to view the XML and it seems that the custom properties XML doesn't change from pre-update to post-update.
I've also tried calling SPListItem.SystemUpdate(...) and SPFile.Update(), but this has yielded no results so far.
So in summary:
- All fields except for managed metadata fields "stick"
- All fields show up fine in SharePoint in view and edit mode
- Managed metadata fields are blank when Word document is open
View Complete Post