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 Ta
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
I had the same problem. The workaround I used was as follows
On Error Resume Next
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Pth
ThisWorkbook.ContentTypeProperties("Report Type").Value = "BranchManagement"
ThisWorkbook.SaveAs Pth
Workbooks(ThisWorkbook.Name).CheckIn
Application.DisplayAlerts = True
On Error GoTo 0
In my case I also had to check the book in after getting it saved. Hope this helps!