Insert a Hyperlink

[ ]

The following code example shows how to inserts a hyperlink into a Word document using the DocumentBuilder class:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Please make sure to visit ");

// Specify font formatting for the hyperlink.
builder.Font.Color = Color.Blue;
builder.Font.Underline = Underline.Single;

// Insert the link.
builder.InsertHyperlink("Aspose Website", "", false);

// Revert to default formatting.
builder.Write(" for more information.");

See also: