Style.LinkStyle property (Word)

Sets or returns a Variant that represents a link between a paragraph and a character style. Read/write.


expression. LinkStyle

expression An expression that returns a 'Style' object.


When a character style and a paragraph style are linked, the two styles take on the same character formatting.


This example creates and formats a new character style, and then it links the character style to the built-in heading style "Heading 1" so that the "Heading 1" style takes on the character formatting of the newly added style.

Sub LinkHeadStyle() 
 Dim styChar1 As Style 
 Set styChar1 = ActiveDocument.Styles.Add _ 
 (Name:="Heading 1 Characters", Type:=wdStyleTypeCharacter) 
 With styChar1 
 .Font.Name = "Verdana" 
 .Font.Bold = True 
 .Font.Shadow = True 
 With .Font.Borders(1) 
 .LineStyle = wdLineStyleDot 
 .LineWidth = wdLineWidth300pt 
 .Color = wdColorDarkRed 
 End With 
 End With 
 ActiveDocument.Styles("Heading 1").LinkStyle = _ 
 ActiveDocument.Styles("Heading 1 Characters") 
 With ActiveDocument.Content 
 .InsertAfter "New Linked Style" 
 End With 
 Selection.Collapse Direction:=wdCollapseEnd 
 Selection.Style = ActiveDocument.Styles("Heading 1") 
End Sub

See also

Style 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.