ParagraphFormat.ListNumberSeparator 属性 (Publisher)

设置或检索一个 PbListSeparator 常量,该常量代表指定段落的列表分隔符。 读/写。

语法

表达式ListNumberSeparator

表达 一个代表 ParagraphFormat 对象的变量。

返回值

PbListNumberSeparator

备注

在设置 ListNumberSeparator 属性之前,必须将 ListType 属性设置为编号列表类型。 如果列表不是编号列表,则返回消息"访问被拒绝"。

ListNumberSeparator 属性值可以是 PbListSeparator 常量之一。

示例

此示例测试列表类型是否为编号列表,特别是 pbListTypeArabic (PbListType 枚举) 。 如果 ListType 属性设置为 pbListTypeArabic,则 ListNumberSeparator 属性设置为 pbListSeparatorParenthesis。 否则,将调用 SetListType 方法,并将 pbListTypeArabic 作为 Value (PbListType) 参数传递,然后可以设置 ListNumberSeparator 属性。

Dim objParaForm As ParagraphFormat 
 
Set objParaForm = ActiveDocument.Pages(1).Shapes(1) _ 
.TextFrame.TextRange.ParagraphFormat 
 
With objParaForm 
 If .ListType = pbListTypeArabic Then 
 .ListNumberSeparator = pbListSeparatorParenthesis 
 Else 
 .SetListType pbListTypeArabic 
 .ListNumberSeparator = pbListSeparatorParenthesis 
 End If 
End With 

支持和反馈

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