Independentsoft
Professional software libraries for developers
Home
Purchase
Support
Company
Contact
ODF .NET
>
Tutorial
> Track changes
The following example shows how to enable track changes in a text document.
C# example
using System; using Independentsoft.Office.Odf; namespace Sample { class Program { static void Main(string[] args) { TextDocument doc = new TextDocument(); doc.TrackedChanges.TrackChanges = true; Paragraph p1 = new Paragraph(); p1.Add("This document has track changes enabled."); doc.Body.Add(p1); Paragraph p2 = new Paragraph(); p2.Add("All modifications will be recorded."); doc.Body.Add(p2); doc.Save("c:\\test\\output.odt", true); } } }
VB example
Imports System Imports Independentsoft.Office.Odf Module Module1 Sub Main(ByVal args() As String) Dim doc As TextDocument = New TextDocument doc.TrackedChanges.TrackChanges = True Dim p1 As Paragraph = New Paragraph p1.Add("This document has track changes enabled.") doc.Body.Add(p1) Dim p2 As Paragraph = New Paragraph p2.Add("All modifications will be recorded.") doc.Body.Add(p2) doc.Save("c:\test\output.odt", True) End Sub End Module
Need help? Ask our developers:
Name*
Email*
Message*