To make programming easier, Aspose.Editor Object Model was built to look and behave like Microsoft Word Automation.
Aspose.Editor already has more than 50 public types in the object model and there will be many more to come. If you are familiar with Microsoft Word Automation, you will be immediately familiar with most classes and members in Aspose.Editor. Even if you have not used Microsoft Word Automation, it is a good API to model because it is widespread and has withstood the test of time.
Some of the classes in Aspose.Editor:
- Document - represents a Microsoft Word document that can be opened inside the editor control.
- Range - Represents a contiguous area in a document. Range is the main class to programmatically access and modify text and formatting in a document.
- Selection - Represents either a selected (highlighted) text in the editor control, or the insertion point if nothing in the document is selected.
- Font - Represents character formatting attributes (font name, font size, color, and so on) of an object.
- ParagraphFormat - Represents all the formatting for a paragraph.
The complete Aspose.Editor API Reference is provided as online HTML as well as compiled CHM help file with code examples in C# and VB.NET
Code example that shows how to create a simple document.
[C#]
Document doc = new Document();
Range range = doc.GetRange();
range.Text = "Hello World!";
range.Font.Name = "Arial";
range.Font.Size = 48;
range.Font.Italic = true;
range.Font.Color = Color.Red;
[VB.NET]
Dim doc As Document = New Document()
Dim range As Range = doc.GetRange()
range.Text = "Hello World!"
range.Font.Name = "Arial"
range.Font.Size = 48
range.Font.Italic = True
range.Font.Color = Color.Red