Set Sharepoint Tags/Properies with VBA

后端 未结 2 763
清酒与你
清酒与你 2021-02-09 19:04

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

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-09 19:55

    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!

提交回复
热议问题