Hyperlink Dialog
- 2 minutes to read
The Edit Hyperlink dialog enables end-users to insert a hyperlink pointing to an external location or local bookmark, and specify the hyperlink tooltip and target frame.
Click the Hyperlink button on the Home ribbon tab or execute ShowHyperlinkFormCommand to open this dialog. Refer to the following article for details on how to add the ribbon UI for the RichEditControl: How to: Create the RichEditControl with a Ribbon UI.
The Hyperlink dialog is also available from the context menu.
Tip
Use the HyperlinkCollection.Create method to create a new hyperlink and add it to the document’s SubDocument.Hyperlinks collection. Refer to the Bookmarks and Hyperlinks topic for an example.
The following API allows you to specify the Hyperlink dialog options in code:
Option | Description | API |
---|---|---|
Text to display | Specifies the hyperlink text. | Hyperlink.Range |
ScreenTip | Specifies text displayed when the mouse hovers over a hyperlink. | Hyperlink.ToolTip |
Target frame | Specifies the frame in which to display the web page when the hyperlink is clicked. This option is in effect only when saving the document as a web page (HTM or HTML format). | Hyperlink.Target |
Link to: | Select Existing file or web page to create a hyperlink. The Place in this document option allows you to associate a link with a bookmark. When this option is selected, the Bookmark field replaces the Address field. | |
Address | Hyperlink.NavigateUri | |
Bookmark | This field becomes available if the Place in this document is selected in the Link to: section. The drop-down list contains available bookmarks. | Hyperlink.Anchor |
Handle the RichEditControl.HyperlinkFormShowing event to customize the default Edit Hyperlink dialog (modify captions, set default dialog values, implement custom validation, etc.) or substitute it with completely new one. Refer to the following article to get an example of the dialog replacement: How to: Customize the Hyperlink Form