PDA

View Full Version : Get Heading Number's Color



heedaf
12-26-2017, 01:31 PM
Need help trying to find the color of a heading number's color index. I've got the following that gives me the numbering:


Sub Test()
'
' Test Macro
'
'
Dim oHdr As Range

Set oHdr = ActiveDocument.GoTo(what:=wdGoToHeading, which:=wdGoToFirst)

Debug.Print oHdr.ListFormat.ListString

End Sub


Is there a way to get the color index of the heading number from the current heading in oHdr range?

Souriane
01-04-2018, 11:03 AM
Hi!,

Try with this line :


Debug.Print oHdr.Font.ColorIndex

Souriane