Generally speaking, we may set formatting for a Word document to make it be more readable, especially font and color. For example, if there are several sections in the document, we may set different font or color for the section title. Sometimes, in order to highlight key words, we can set it with bigger font size or bright color. With well formatting, readers can learn more clearly about the idea of each part and the layout will be more appealed after printing.

How to set Word font and color? Firstly, we should have an idea about the formatting, such as where we put the title and key words, which font style is more appropriate and so on. Then, according to the idea, select words which should be designed and use the font tools to format them. In Word 2007, the font tools are presented in Start menu. Click Start and then you can choose any helpful one to work on your words.

Next, I will introduce another method to set Word font and color with C#. The example I will show is to set font as Tahoma, color as blue and add underline for the whole paragraph. Note: this method is based on a component: Spire.Doc, which works on Word for Silverlight and .NET. Please download it and add DLL file as reference in your project after installing.

//Create word document

Document document = new Document();

//Create a new secition

Section section = document.AddSection();

//Create a new paragraph

Paragraph paragraph = section.AddParagraph();

//Append Text

String text

    = "This paragraph is demo of text font and color. "

    + "The font name of this paragraph is Tahoma. "

    + "The font size of this paragraph is 20. "

    + "The underline style of this paragraph is DotDot. "

    + "The color of this paragraph is Blue. ";

TextRange txtRange = paragraph.AppendText(text);

//Font name

txtRange.CharacterFormat.FontName = "Tahoma";

//Font size

txtRange.CharacterFormat.FontSize = 20;


txtRange.CharacterFormat.UnderlineStyle = UnderlineStyle.DotDot;

//Change text color

txtRange.CharacterFormat.TextColor = Color.Blue;

//Save doc file.