Consulting

Results 1 to 2 of 2

Thread: Get Heading Number's Color

  1. #1
    VBAX Contributor
    Joined
    Jun 2014
    Posts
    107
    Location

    Get Heading Number's Color

    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?

  2. #2
    Hi!,

    Try with this line :

    Debug.Print oHdr.Font.ColorIndex
    Souriane

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •