[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Expand]Visual Elements
    Services
    Events
    Commands
    HTML Tag Support
   [Collapse]Examples
    [Expand]UI Customization
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Collapse]Document Elements
      How to: Insert Bookmark or Hyperlink
      How to: Create, Edit and Delete Comments
      How to: Specify Document Properties
      How to: Create and Modify Header
      How to: Create a Checkbox
    [Expand]Layout
    [Expand]Automation
    [Expand]Mail Merge
     Spell Check
    [Expand]Export
    [Expand]Printing
    [Expand]Protection
    [Expand]Commands
    [Expand]Miscellaneous
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Insert Bookmark or Hyperlink

The following example demonstrates how to create a bookmark or hyperlink in the document.

Expanded Insert A Hyperlink

To create a hyperlink, use the HyperlinkCollection.Create method. The newly created Hyperlink object will be automatically added to the document hyperlink collection, represented by the HyperlinkCollection instance.

Use the hyperlink's Hyperlink.NavigateUri property to set a target URI. To specify a text for the tooltip displayed when the mouse hovers over a hyperlink, use the Hyperlink.ToolTip property.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T213968.

Expanded Insert A Bookmark

To create a bookmark, use the BookmarkCollection.Create method. It creates a Bookmark object with the specified name and range (or position) and adds it to the BookmarkCollection. Use the Document.Bookmark property to get access to the collection.

A bookmark can be referenced by a hyperlink. To do that, set the hyperlink's Hyperlink.Anchor property to the corresponding bookmark name, as in the code snippet below.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T213968.

Is this topic helpful?​​​​​​​