是否可以使用 VBA 设置 Sharepoint 文档(特别是 Excel)的标签。目前我知道处理此问题的唯一方法是将文件保存到 Sharepoint,在出现提示时设置标签,然后再次下载该文件并将其用作模板。
然而,我需要使用这些标签的几种不同排列,并且必须为每个标签创建一个单独的模板是一件非常痛苦的事情,特别是如果您随后需要修改模板,并且必须重复这些修改数十次。
那么可以通过VBA来做到这一点吗?我尝试在设置宏时录制宏,但它没有记录有关标签的任何内容
据我所知,我们可以设置一个标签Excel文档 in VBA在将其上传到 Sharepoint 库之前,
通过设置值
Workbook.ContentTypeProperties
例如:
ActiveWorkbook.ContentTypeProperties("Line of Business").Value = pLine
ActiveWorkbook.ContentTypeProperties("Company Name").Value = pCompany
ActiveWorkbook.ContentTypeProperties("Year").Value = pYear
我会链接一些阅读材料以了解更多信息:它可能有用:[John Chapman 的 SharePoint 博客:从 Excel VBA 更新 SharePoint 文档属性]
http://www.sharepointjohn.com/sharepoint-2007- http://www.sharepointjohn.com/sharepoint-2007-–-update-sharepoint-document-property-from-excel-vba/
请注意,某些类型的财产存在一些问题:请参阅设置将在 Sharepoint 中使用的自定义文档属性 http://www.mrexcel.com/forum/excel-questions/729940-setting-custom-document-properties-will-used-sharepoint.html and 这个线程 http://social.msdn.microsoft.com/Forums/office/en-US/6adcd4dd-4cf1-4990-9e8c-932bdf478a27/how-to-addupdate-user-type-of-document-properties-of-a-sharepoint-document-in-office-ui?forum=exceldev
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)