DocumentBuilderInsertHorizontalRule Method
Inserts a horizontal rule shape into the document.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.10
Syntax
public void InsertHorizontalRule()
Examples
Shows how to insert horizontal rule shape in a document.
[C#]

// Use a document builder to insert a horizontal rule
DocumentBuilder builder = new DocumentBuilder();
builder.InsertHorizontalRule();

// Get the rule from the document's shape collection and verify it
Shape horizontalRule = (Shape)builder.Document.GetChild(NodeType.Shape, 0, true);
Assert.True(horizontalRule.IsHorizontalRule);
See Also