Aspose::Words::Font::set_HighlightColor method
Font::set_HighlightColor method
Sets the highlight (marker) color.
void Aspose::Words::Font::set_HighlightColor(System::Drawing::Color value)
Examples
Shows how to format a run of text using its font property.
auto doc = System::MakeObject<Aspose::Words::Document>();
auto run = System::MakeObject<Aspose::Words::Run>(doc, u"Hello world!");
System::SharedPtr<Aspose::Words::Font> font = run->get_Font();
font->set_Name(u"Courier New");
font->set_Size(36);
font->set_HighlightColor(System::Drawing::Color::get_Yellow());
doc->get_FirstSection()->get_Body()->get_FirstParagraph()->AppendChild<System::SharedPtr<Aspose::Words::Run>>(run);
doc->Save(get_ArtifactsDir() + u"Font.CreateFormattedRun.docx");
See Also
- Class Font
- Namespace Aspose::Words
- Library Aspose.Words for C++