StyleBuiltIn Property

True if this style is one of the built-in styles in MS Word.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool BuiltIn { get; }

Property Value

Type: Boolean
Examples
Applies double underline to all runs in a document that are formatted with custom character styles.
Document doc = new Document(MyDir + "Custom style.docx");

// Select all run nodes in the document
NodeCollection runs = doc.GetChildNodes(NodeType.Run, true);

// Loop through every run node
foreach (Run run in runs.OfType<Run>())
{
    Style charStyle = run.Font.Style;

    // If the style of the run is not a built-in character style, apply double underline
    if (!charStyle.BuiltIn)
        run.Font.Underline = Underline.Double;
}

doc.Save(ArtifactsDir + "Font.Style.doc");
See Also