Nelviticus
Programmer
I'm trying to do some automation on a huge document. This involves building a list of certain heading types but instead of using styles properly the various authors have just applied colours to the heading manually.
This means that the only way of identifying the heading type of a paragraph is check its colour:
However, paragraphs with the same RGB value - in this case 63/166/204 - sometimes show up with a 'long' value of 13411903 and sometimes with -587137025. The same goes for other colours, sometimes it's the long you'd expect and sometimes it's a bizarre negative number.
Any idea why this might be, or how I can convert these negative numbers into their actual colour values? When you check the colour of the paragraph in the font dialog box it's correct - two blue paras will both be RGB 63/166/204 yet the code will report one as having a color of 13411903 and the other of -587137025. It's nuts!
Thanks
Nelviticus
This means that the only way of identifying the heading type of a paragraph is check its colour:
Code:
para.Range.Font.Color
Any idea why this might be, or how I can convert these negative numbers into their actual colour values? When you check the colour of the paragraph in the font dialog box it's correct - two blue paras will both be RGB 63/166/204 yet the code will report one as having a color of 13411903 and the other of -587137025. It's nuts!
Thanks
Nelviticus