CaptionLabels.Add method (Word)

Returns a CaptionLabel object that represents a custom caption label.

Syntax

expression.Add (Name)

expression Required. A variable that represents a 'CaptionLabels' collection.

Parameters

Name Required/Optional Data type Description
Name Required String The name of the custom caption label.

Return value

CaptionLabel

Example

This example adds a custom caption label named Demo Slide. To verify that the custom label is added, view the Label combo box in the Caption dialog box, accessed from the Reference command on the Insert menu.

Sub CapLbl() 
 CaptionLabels.Add Name:="Demo Slide" 
End Sub

See also

CaptionLabels Collection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.