Jyotiprakash
2 years agoOccasional Contributor
How to read the Fontcolour of header section of the wordfile using vbscript?
I have a word file which has header and contents. One of the header text font colour is grey.I want to read the font colour of that text or header part .
I didnt find any solution to read the header font colour.Can anyone help please?
Hi,
You need to work with Word Object Model using COM.
Check samples provided by TestComplete: https://support.smartbear.com/testcomplete/docs/tutorials/samples/common/msoffice.html and related articles.
Also something like this:
https://learn.microsoft.com/en-us/office/vba/api/word.font.colorindex
https://learn.microsoft.com/en-us/office/vba/api/word.font
https://www.msofficeforums.com/word-vba/48881-change-font-color-selected-text-only.html