Set Sharepoint Tags/Properies with VBA

后端 未结 2 764
清酒与你
清酒与你 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:32

    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

提交回复
热议问题