BuiltIn Property

Microsoft Word Visual Basic

BuiltIn Property

       

True if the specified object is one of the built-in styles or caption labels in Word. Read-only Boolean.

Remarks

You can specify built-in styles across all languages by using the WdBuiltinStyle constants or within a language by using the style name for the language version of Word. For example, if you specify U.S. English in your Microsoft Office language settings, the following statements are equivalent:

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

Example

This example checks all the styles in the active document. When it finds a style that isn't built in, it displays the name of the style.

Dim styleLoop As Style

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

This example checks all the caption labels that have been created in the application. When it finds a caption label that isn't built in, it displays the name of the label.

Dim clLoop As CaptionLabel

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