ListNumberSeparator Property

Microsoft Publisher Visual Basic

Show All Show All

ListNumberSeparator Property

Sets or retrieves a PbListNumberSeparator constant that represents the list separator of the specified paragraphs. Read/write.

PbListNumberSeparator can be one of these PbListNumberSeparator constants.
pbListSeparatorColon
pbListSeparatorDoubleHyphen
pbListSeparatorDoubleParen
pbListSeparatorDoubleSquare
pbListSeparatorParenthesis
pbListSeparatorPeriod
pbListSeparatorPlain
pbListSeparatorSquare
pbListSeparatorWideComma

expression.ListNumberSeparator

expression   Required. An expression that returns a ParagraphFormat object.

Remarks

The ListType property must be set to a numbered list type before setting the ListNumberSeparator property. Returns an "Access Denied" message if the list is not a numbered list.

Example

This example tests to see if the list type is a numbered list, specifically pbListTypeArabic. If the ListType property is set to pbListTypeArabic the ListNumberSeparator is set to pbListSeparatorParenthesis. Otherwise, the SetListType method is called and passed pbListTypeArabic as the pbListType parameter and then the ListNumberSeparator property can be set.

      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