0
votes

I'm designing a macro to check all the shapes, charts and smart art on a given PowerPoint slide and print it's font colour and style.

The line that is (indirectly) giving me problems is

MsgBox .TextFrame.TextRange.Font.Color.RGB

The colour is outputted, but it is giving the MSaccess colour which is not as useful as the RGB colour. For example, a white block of text would be displayed as "16777215", whereas I would like to see "255,255,255"

I've indicated in the line that I want .color.rgb but this doesn't seem to make a difference.

I'd appreciate any help very much! Thank you!

2
Google is your friend. Ask it for help with e.g. RGB LONG to R G B - Steve Rindsberg

2 Answers

0
votes

You can convert this "colorInt" to RGB using something like

B = floor(colorInt / (256*256))
G = floor((colorInt - B*256*256)/256)
R = colorInt - B*256*256 - G*256
0
votes

To format an RGB color with Excel:

Const color = vbMagenta

Dim r&, g&, b&
r = color And 255
g = color \ 256 And 255
b = color \ 65536
Debug.Print Format(r * 1000000 + g * 1000& + b, "000,000,000")