Page.Tags 属性 (Publisher)
返回 Tags 集合,代表应用于形状、形状范围、页面或出版物的标签或自定义属性。
语法
表达式。标签
表达 一个代表 Page 对象的变量。
示例
以下示例将标签添加到当前出版物的第一页上的每个椭圆上。
Dim shp As Shape
Dim tagsAll As Tags
Dim tagLoop As Tag
Dim blnTag As Boolean
With ActiveDocument.Pages(1)
For Each shp In .Shapes
If shp.AutoShapeType = msoShapeOval Then
Set tagsAll = shp.Tags
blnTag = False
For Each tagLoop In tagsAll
If tagLoop.Name = "Shape" Then
blnTag = True
Exit For
End If
Next tagLoop
If blnTag = False Then
tagsAll.Add Name:="Shape", Value:="Oval"
End If
End If
Next shp
End With
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈