0

I am trying to use metadata from an Excel file to use for filtering in our sharepoint libraby. The excel file already contains dropdown menus to pick certain values from, which are then used to create a very lengthy filename. However for our new sharepoint libraby I would like to move those to metadata, so it can be made visible in sharepoint columns and users can filter. The file is a template that should be filled by users and when ready saved after choosing certain values.

The creation of the filename is done in VBA and therefore all values I want to use are available there. I've tried a number of approaches I found in forums using e.g. customdocumentproperties and made it work...sometimes... While it worked in the beginning, I cannot make it work now. It seems changing the metadata is a problem. Creating the metadata fields for the first time worked, but then changing it, did not. I have the feeling I do not understand some basics on this action. Microsoft websites are not of any help here...

What is the best - flawless - way to use VBA to create, add, change metadata in the excel-file that can be made visiblle in the sharepoint library? And are there any typical problems?

  • 1
    Have you seen https://stackoverflow.com/questions/14863250/how-to-add-a-documentproperty-to-customdocumentproperties-in-excel? Keep in mind that you can't change the property type once it is created. – FunThomas Mar 17 '21 at 09:10
  • I started again with a fresh file and used: ActiveWorkbook.CustomDocumentProperties.Add name:="BG", LinkToContent:=False, Type:=msoPropertyTypeString, Value:=BG_name this I used for seven properties. I could see the properties in the advanced properties of the file. When I uploaded to Sharepoint only one of them appeared in the respective columns with the exact same names in the library. No idea why, since I used same code for all of them. – SebastianVO21 Mar 18 '21 at 10:59
  • No other idea? Why does it work for some properties, but not for all? Am I missing anything? – SebastianVO21 Mar 23 '21 at 07:23
  • Maybe you should address this to https://sharepoint.stackexchange.com/ - it seems that the Excel/VBA part is working. – FunThomas Mar 23 '21 at 08:08
  • I've tried the sharepoint site. No response at all. Seems this is a dead end. Maybe I overestimated the opportunities that sharepoint offers.... – SebastianVO21 Mar 30 '21 at 06:13

0 Answers0