PDA

View Full Version : [SOLVED:] Strikethrough on Header Number



heedaf
07-21-2017, 03:38 PM
I've got a header number that I need to be able to strike through. I'm using a range and would like to access the strikethrough field for the header number but I can't out how to do it. This does work:

oRng.Paragraphs(1).SelectNumber
Selection.Font.StrikeThrough = true
But I'd rather not use "selection". Anyone have an idea on how to do this?

gmaxey
07-21-2017, 07:25 PM
heedaf,

When you post code, please post code that will compile!


Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey, http://gregmaxey.com/word_tips.html, 7/21/2017
Dim oRng As Range
Set oRng = ActiveDocument.Paragraphs(1).Range
oRng.Characters.Last.Font.StrikeThrough = True
lbl_Exit:
Exit Sub
End Sub