Question

All replies

You need to work with a Range object. Document.Content would be the entire main body of the document. Since you don't give any indication how you're "getting" the text in the document, it's not possible to give you any example how to get a Range object for
your particular requirement...

It is not returning any error but the blue font is not getting applied<<

Well, no, the font would not turn blue since you're passing in the black enum.

Please note that the enum would be: wdBlack and not WdBlack, in case that makes a difference in C++

You mention converting to PDF: are you checking the document before doing the conversion, just to make sure that there's no change? (Not that converting to PDF should in some way revert to the other color, but it's important to be sure...)

Unfortunately, I can't help you with C++ code; C# is the best I can do in C-speak. So I don't know if there are problems with C++ where you might have to first create a Range object, then a Font object, etc.