StrikeThrough Property

Microsoft Word Visual Basic

StrikeThrough Property

       

True if the font is formatted as strikethrough text. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Long.

expression.StrikeThrough

expression   Required. An expression that returns a Font object.

Remarks

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.

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.

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