StyleBuiltIn Property |
Namespace: Aspose.Words
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");