Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
ODF .NET
>
Tutorial
> Add hyperlink
The following example shows you how to add a hyperlink.
C# example
using System; using Independentsoft.Office.Odf; namespace Sample { class Program { static void Main(string[] args) { TextDocument doc = new TextDocument(); Hyperlink link = new Hyperlink(); link.Add("Independentsoft"); link.Location = "http://www.independentsoft.com"; Paragraph paragraph1 = new Paragraph(); paragraph1.Add(link); doc.Body.Add(paragraph1); 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() Dim link As Hyperlink = New Hyperlink link.Add("Independentsoft") link.Location = "http://www.independentsoft.com" Dim paragraph1 As Paragraph = New Paragraph paragraph1.Add(link) doc.Body.Add(paragraph1) doc.Save("c:\test\output.odt", True) End Sub End Module
Need help? Ask our developers:
Name*
Email*
Message*