CaptionLabel.BuiltIn 属性 (Word)

True 指定的题注标签是否在 Word 中的内置题注标签之一。 只读 Boolean

语法

表达式内置

表达 一个代表“CaptionLabel”对象的变量。

备注

可以指定内置样式在所有语言使用的 WdBuiltinStyle 常量或在一种语言中使用的语言版本的 Word 样式名称。 例如,如果您的 Microsoft Office 语言设置中指定了美国英语,下面的语句是等效的:

ActiveDocument.Styles(wdStyleHeading1) 
ActiveDocument.Styles("Heading 1")

示例

本示例检查活动文档中的所有样式。 当它找到未内置样式时,会显示样式的名称。

Dim styleLoop As Style 
 
For Each styleLoop in ActiveDocument.Styles 
 If styleLoop.BuiltIn = False Then 
 Msgbox styleLoop.NameLocal 
 End If 
Next styleLoop

此示例检查已在应用程序中创建的所有标题标签。 当它找到未内置标题标签时,它将显示标签的名称。

Dim clLoop As CaptionLabel 
 
For Each clLoop in CaptionLabels 
 If clLoop.BuiltIn = False Then 
 Msgbox clLoop.Name 
 End If 
Next clLoop

另请参阅

CaptionLabel 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。