Forum Discussion
Update managed metadata column via VBA
We are trying to upload files to a SharePoint and update some columns with managed metadata (MM).
We have done this successfully before for normal "single text lines", but it seems like there must be special trick to do that for MM.
We have realized that the related ContentTypeProperties.Item.Value(0) and .Value(1). are only available if the file already has a value in there. Before it has msoMetaPropertyType Unknown - afterwards it is changed and looks like it is a string type.
When opening the file on SharePoint and trying to apply the managed metadata value simply nothing is happening to the file... no error ... just passing the piece of code.
Any ideas?
2 Replies
- Heiko WatzIron Contributor
I have the same problem when I try to set a people field from VBA.
In my case I use a text field and lost the functionality of a people field.
But it where nice when someone has a better solution for us.
It is good that I’m not the only one who has to use VBA and SharePoint.
- Patrick RohnerCopper Contributor
Did you try it like this - example: Application.Workbooks(sNewBookName).ContentTypeProperties.Item("Entity Contact 2 ID").Value = sContact2