Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    Spell Checking
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Expand]Visual Elements
    Services
    Events
    Commands
   [Expand]Member Tables
    Keyboard Shortcuts
    HTML Tag Interpretation
   [Collapse]Examples
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Expand]Layout
    [Expand]Automation
    [Expand]Search and Replace
    [Expand]Mail Merge
    [Expand]Spell Check
    [Expand]Export-Import
    [Expand]Printing
    [Expand]Protection
    [Expand]User Interface Customization
    [Collapse]Miscellaneous
      How to: Insert Bookmark or Hyperlink
      How to: Create, Edit and Delete Comments
      How to: Specify Document Properties
      How to: Create and Modify Header
    [Expand]Commands
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report 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 Create 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=E5219.

Expanded Create 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=E5219.

How would you rate this topic?​​​​​​​