Hyperlinks and bookmarks
Table of Contents
How to add a bookmark and a hyperlink to the document using the toolbar
How to add a bookmark and a hyperlink to the document via code

How to add a bookmark and a hyperlink to the document 
1.	Add some text to the RichEditControl, i.e. type 'Bookmark is here' .
2.	Select the text that represents the bookmark area - the word 'here' - and click the Bookmark toolbar button (upper left). Provide a Bookmark name, for example, Bookmark01 and click Add.

You can use the context menu command instead:

3.	Close the Bookmark dialog. 
4.	To add a hyperlink in the text to the bookmark select the text for the hyperlink and click the Insert Hyperlink button or right-click and select Hyperlink from the RichEditControl’s runtime context menu, or use the CTRL + K key combination. 
5.	Add the text to display—which will be the selected text by default—provide a ScreenTip, in the Link to region select the “Place in this document” radio button and select the Bookmark01 from the drop down list. 
The hyperlink will be visible at the selected location, and holding the CTRL key while clicking will jump the focus from the hyperlink to the defined bookmark.
◄◄ back to the Table of Contents 
How to add a bookmark and a hyperlink to the document via code
The following code can be used instead of the keyboard and mouse manipulation described above and results in the hyperlink pointing to the newly created bookmark.
C#
using DevExpress.XtraRichEdit.API.Native;
// ...

Document doc = richEditControl1.Document;
ISearchResult searchResult = doc.StartSearch("here", SearchOptions.WholeWord, SearchDirection.Forward);
if (searchResult.FindNext())
{
    doc.CreateBookmark(searchResult.CurrentResult, "Bookmark01");
    DocumentRange range = doc.InsertSingleLineText(doc.CreatePosition(0), "Hyperlink to bookmark");
    Hyperlink hlink = doc.CreateHyperlink(range);
    hlink.Anchor = doc.Bookmarks[0].Name;
    hlink.ToolTip = "Bookmark 01";
}

VB .NET
Imports DevExpress.XtraRichEdit.API.Native
' ...
Dim doc As Document = richEditControl1.Document
Dim searchResult As ISearchResult = doc.StartSearch("here", SearchOptions.WholeWord, SearchDirection.Forward)
  If searchResult.FindNext() Then
        doc.CreateBookmark(searchResult.CurrentResult, "Bookmark01")
      Dim range As DocumentRange = doc.InsertSingleLineText(doc.CreatePosition(0), "Hyperlink to bookmark")
      Dim hlink As Hyperlink = doc.CreateHyperlink(range)
      hlink.Anchor = doc.Bookmarks(0).Name
      hlink.ToolTip = "Bookmark 01"
  End If

◄◄ back to the Table of Contents