Share via

How to determine cell border colour in powerpoint?

Anonymous
2022-09-13T14:37:13+00:00

Hi,

If I have a table in powerpoint, how do I determine (not change) the colour/properties of the border of that cell?

When I go to Borders in the Table Design tab, it just suggests what I used previously.

Thanks

Microsoft 365 and Office | PowerPoint | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-09-13T17:58:12+00:00

    Code is probably the best way but if you don't want to go there you can add "Eyedropper - Line" to the QAT it will only activate if you select a normal shape.

    This can then be used to read the color of the outline but be careful as it you need to get the centre of the line as it is anti aliased and may read a different color at the very edge. 400% zoom helps or a thick line!

    1 person found this answer helpful.
    0 comments No comments
  2. John Korchok 231.6K Reputation points Volunteer Moderator
    2022-09-13T16:24:43+00:00

    PowerPoint has always done this, but that doesn't make it less annoying. This isn't too hard to guess if the presentation theme colors have been used. This macro will display number that reflects the theme color used to the bottom border of a selected cell:

    Sub GetTableBorderThemeColor()
        MsgBox Application.ActiveWindow.Selection.ShapeRange(1).Table.Cell(1, 1).Borders.Item(ppBorderLeft).ForeColor.ObjectThemeColor
    End Sub
    

    Then you can look up that number to get the theme color on this page: MsoThemeColorIndex enumeration

    But more often, users will use local formatting to create who knows what color. In that case, you can run this macro to get the border color of a selected cell (in this example, the bottom border):

    Sub GetTableBorderRGBColor()
        Dim LongColor As Long
        Dim R$, G$, B$
        LongColor = Application.ActiveWindow.Selection.ShapeRange(1).Table.Cell(1, 1).Borders.Item(ppBorderLeft).ForeColor.RGB
        R$ = CStr(LongColor Mod 256)
        G$ = CStr(LongColor \ 256 Mod 256)
        B$ = CStr(LongColor \ 65536 Mod 256)
        MsgBox "Red: " & R$ & " Green: " & G$ & " Blue: " & B$
    End Sub
    
    1 person found this answer helpful.
    0 comments No comments