Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
ODF .NET
>
Tutorial
> Replace text
The example shows you how to open a text document and replace text.
C# example
using System; using Independentsoft.Office.Odf; namespace Sample { class Program { static void Main(string[] args) { TextDocument doc = new TextDocument("c:\\test\\input.odt"); doc.Replace("John Smith", "Mary Rose"); 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 New TextDocument("c:\test\input.odt") doc.Replace("John Smith", "Mary Rose") doc.Save("c:\test\output.odt", True) End Sub End Module
Need help? Ask our developers:
Name*
Email*
Message*