Is it possible to set the Tags of a Sharepoint document (specifically Excel) using VBA. At present the only way I know to handle this is to save a file to Sharepoint, set the Tags when prompted, nd then download this file again and use it as a template.
However, I need to work with several different permuations of these Tags and it's a major pain having to create a separate template for each one, especially if you then need to amend the template, and have to replicate those amendments 10s of times.
So is it possible to do this via VBA? I've tried recording a macro whilst I set them and it doesn't record anything regarding the Tags
As far as I know , we can set the Tags of an Excel document in VBA before it gets uploaded onto a Sharepoint library, by settings values for the
Workbook.ContentTypeProperties
For example:
ActiveWorkbook.ContentTypeProperties("Line of Business").Value = pLine
ActiveWorkbook.ContentTypeProperties("Company Name").Value = pCompany
ActiveWorkbook.ContentTypeProperties("Year").Value = pYear
I'd link some readings to learn more: It might be useful:[John Chapman's SharePoint Blog: Update SharePoint Document Property from Excel VBA]
http://www.sharepointjohn.com/sharepoint-2007-–-update-sharepoint-document-property-from-excel-vba/
Please note that there are some troubles with certain types of property: see Setting Custom Document properties that will be used in Sharepoint and this thread
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With