Font.StrikeThrough Property

Word Developer Reference

True if the font is formatted as strikethrough text. Read/write Long.

Syntax

expression.StrikeThrough

expression   An expression that returns a Font object.

Remarks

The StrikeThrough property returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle.

To set or return double strikethrough formatting, use the DoubleStrikeThrough property.

Example

This example applies strikethrough formatting to the first three words in the active document.

Visual Basic for Applications
  Set myDoc = ActiveDocument
Set myRange = myDoc.Range(Start:=myDoc.Words(1).Start, _
    End:=myDoc.Words(3).End)
myRange.Font.StrikeThrough = True

This example applies strikethrough formatting to the selected text.

Visual Basic for Applications
  If Selection.Type = wdSelectionNormal Then
    Selection.Font.StrikeThrough = True
Else
    MsgBox "You need to select some text."
End If

See Also