| Barry MacDonnell's
Toolbox for WordPerfect
Macros, tips, and
templates for Corel® WordPerfect® for Windows®
| Page updated Apr 13, 2021
Main tips page | Browse more tips
| How to create hyperlinks (hypertext links) in
Related pages -
• Why some hyperlinks can fail to work in WordPerfect documents
• How to remove blue underlines in email addresses, web site URLs, or hyperlinks from your printouts; how to change the color of hyperlinks in the document
• Cross references — a reference tool that displays (and optionally links to) a specific page number, paragraph, figure, footnote, etc.
[See WordPerfect's Help (F1 key) and search for "cross reference".
See also these related macros: Find broken cross references and Convert cross reference numbers]
• LinkToURL - a macro that automates the creation of an active hyperlink in a WordPerfect document from a selected Internet address ("URL")
• LinkNotes - a macro that creates "round-trip" hyperlinks to let you quickly jump between a particular footnote or endnote number in a document to the footnote or endnote itself -- and vice versa -- with a mouse click
• Publishing to PDF - some tips
• Creating Hyperlink Buttons on current document - a post by Klaus Pfeiffer on WordPerfect Universe with a downloadable macro that creates a custom button with your choice of hyperlinks that run (or open) another macro, open a document, go to a bookmark, or go to a Web address (for WP8 and later versions)
[Note: WordPerfect menu choices here refer to the <WordPerfect> menu. (Right-click on WordPerfect's top menu bar for a choice of menus.) If you use a <Microsoft Word> menu, the choices might be absent from your menu (but not from the program), or they might be found under another menu selection. See here for more.]
The Hyperlink feature
The WordPerfect Hyperlink feature (on the Tools, Hyperlink... menu) lets you create active links to
• another part of the current document, or to
• a different document on your disk, or to
• a website page, or to
• launch an available macro.
Because the first task is probably the most often used and because it has a couple of quirks, the following information explains how to create clickable hyperlinks in the current document to help navigate the document (or a PDF document created from it) and provides some tips.
The other three tasks are mentioned below, but they are not the primary focus.
Note: Several WordPerfect features — e.g., Cross References and SpeedLinks, as well as page numbering links in a Table of Contents, List, Index and Table of authorities — automatically (by default) create and make use of hyperlinks.
Hyperlinks in a WordPerfect document
To create a hyperlink from a source word/phrase/symbol/graphic to a target area in the current document requires an easy, two-step process:  bookmark the target and  create the hyperlink to it at the source location.
An example of how to create such a hyperlink is given below, using the common task of linking to a Table of Contents in the document.
Generally, the source — and there can be more than one in the document — can be located in the main body text area, or it can be inside a "substructure" like a header, footer, footnote, endnote, or even a text box or graphic caption.
(Tip: Using a header or footer means the link will be visible and active on any page where that header or footer is displayed. But be sure not to create the header or footer inside the TOC area after you create it, for the reasons noted here.)
The target for the source's hyperlink is a WordPerfect bookmark, usually placed at the beginning of the relevant area.
When the hyperlink is created or generated, a paired (on/off) Hyperlink code surrounds the source and internally links it to its target. By default the link is formatted with a Hypertext style in bright blue underlined text, but these attributes can be changed or augmented if desired (see the Tips and notes section below).
Tips and notes on hyperlinking
☼ More about linking to a target in the Document/Macro field [shown in Step 2 above]:
• What should be in the Document/Macro field?
When hyperlinking to anywhere inside the currently open (on screen) document, always use the Document/Macro field's default of "<current document>". (See Example above.)
Alternative entries for the Document/Macro field:
▸ For certain other purposes, instead of navigating to a bookmark in the current document you could have a hyperlink open some other document on your disk.
▸ Similarly, you could also have a hyperlink open a Web address in your computer browser.
▸ Finally, you could have a hyperlink play a macro.
These 3 alternatives, and their possible effect on WordPerfect generated hyperlinks in PDF files, are discussed in Footnote 1.
• You can have several source links in a document to the same target. They can even use different text, symbols, or graphic images as long as they use the same bookmark.
Note that if you use a header or footer for this purpose you only need to create the hyperlink once in any given header or footer you create, since the link will show up on all pages where that particular header/footer is displayed. (Headers and footers are "repeating elements". For more on creating and using them see here.)
• If you want to use a graphic image as a clickable source you can left-click on the image to select it, and then click Hyperlink Create button on the Graphics property bar that should appear. (Alternatively, right-click the image, choose Edit Box from the context menu, and then use either that Hyperlink Create button or use the main menu's Tools, Hyperlink.) This brings up the Hyperlink Properties dialog (Step 2 above).
☼ The above 2-step method can be used to create hyperlinks to other parts of the document, not just a Table of Contents.
For example you can link to a particular section or chapter, an index, a WordPerfect List, a specific table or graphic, etc. Just create the appropriate bookmark (in Step 1) at those locations.
As noted in the previous tip the 2-step method can create hyperlinks to another document, or a Web address, or a macro (to play it).
☼ You can quickly edit a hyperlink to change its target.
One way is by double-clicking on its [Hyperlink] code in Reveal Codes. This brings up the Hyperlink Properties dialog described in Step 2 above.
If your source is an image, you can also just right-click on it and choose Edit Hyperlink from the context menu to bring up the Hyperlink Properties dialog.
☼ Customize the appearance.
• You can remove underlines from hyperlinks in the current document, and/or change or remove the color of the hyperlink's text, and/or add highlighting to it.
This is done by editing the document's Hypertext style, which is what does the job of formatting the hyperlink in the document with color, underlines, font, etc.
This method changes all hyperlink styles in the current document, even those that are used in Cross references and those that link the page numbers in a Table of Contents, Table of authorities, List, or Index. (It's an all-or-nothing situation.)
If hyperlinks were active they will still be active since you are just modifying the hyperlink's format style, not the hyperlink itself. (See here for more on activating hyperlinks.)
 Click Format, Styles, and select Hypertext in the 'Available styles' list. (Note: If no hyperlinks are present in the document, the Hypertext style name will not appear.)
 Then click Edit to open the Styles Editor. At the bottom of the Styles Editor dialog, be sure to enable (i.e., check) the two boxes, "Reveal Codes" and "Show 'off codes'".
▸ In the Contents pane of the Styles Editor you can remove the [Color] and/or [Und] codes (drag them from the pane or use the Delete or Backspace key. DO NOT delete the long [Codes to the left are ON - Codes to the right are OFF] code [screen shot]. Use Cancel if you make a mistake or you want to abort your changes.
[See the next item below if you want to reset them to their default.]
▸ To change the hyperlink's text color, click in the Styles Editor's Contents pane just after the existing [Color] code and then use Format, Font on the Editor's menu bar to open the Font properties dialog. Open the color picker and choose a color, then click OK.
▸ To change the hyperlink's font and/or font size, click in the Styles Editor's Contents pane -- typically before all other codes -- and then use either Format, Font on the Editor's menu to open the Font properties dialog; or you can just use the Editor's text property bar's font and size fields.
▸ To highlight the hypertext see Footnote 2.
[Again, note that these modifications will change ALL hyperlink styles in the current document -- cross references, page numbering links in a Table of Contents, List, Index, etc. (You can always reset the hyperlink style: see below.)]
 Click OK to close the Styles Editor, then click Close.
• To reset the hypertext style in the current document back to the default (blue text with underlines), use Format, Styles, Hypertext, Options, Reset.
• Advanced users: To save the customized style for all future documents based on the default template, see the Custom Styles page about editing and saving customized system styles (i.e., styles built into the program and available to new documents).
However: Because the above modifications affect ALL hyperlink styles in a document, it might be a better practice to modify just the current document as explained above rather than modify the default template.
Reason: For example, you might not often use cross references, but if you do use them sometime in the future you might not want the custom hypertext style to affect their appearance. (Again, customizing the hypertext style is an all-or-nothing situation for the various types of links in a document.)
Alternative: You could set up a custom template with your preferred hypertext style (and any other customizations). Then only those documents based on that specific template will use the customized hypertext style.
Open Reveal Codes and drag the desired [Hyperlink] code from the Reveal Codes window (or use the [Delete] or [Backspace] keys inside Reveal Codes to delete that code.).
You can also delete its source text, symbol, or graphic from the document if desired.
Note that the same thing can be done with a related [Bookmark] code (if used) if it is no longer needed.
☼ To find and delete ALL hyperlinks the easy way:
You can use Edit, Find and Replace:
Click inside the Find field, then click Match, Codes on the F&R menu and scroll down in the list to Hyperlink Begin. (In the Replace With field, leave the field set to <None> or just delete the field's contents to leave it blank.)
Click Replace All -- or to "step" through to the next item -- use Find Next.
Note that this method deletes all hyperlinks, including (e.g.) in an existing Table of Contents, Index, cross reference, etc. (The TOC/Index, at least, can be regenerated later to replace the links.)
If you wish to delete just navigation hyperlinks such as the one to a TOC described above:  open Reveal Codes, then  display the hyperlink property bar by right-clicking any toolbar and clicking Hyperlink Tools;  then use the Hyperlink Next or Hyperlink Previous buttons on that bar to jump individually from one link to the next, skipping over the ones you want to keep and (in Reveal Codes) deleting the others — the same way described in the tip above about deleting a particular hyperlink. [Note that these buttons do not search inside substructures such as headers, footers, footnotes. endnotes, text boxes, etc.]
☼ Using a header or footer to contain the hyperlinked item that links back to a Table of Contents (or similar structured text) has the advantage of displaying the hyperlinked item on every page where that particular header or footer is present.
For more on these structures see here.
Moreover, you only need to create the hyperlink once inside a header or footer.
This might be convenient for the reader, especially if the document is published as a PDF file. (Newer WordPerfect versions are much better at carrying most hyperlinks over to the resulting PDF file. See notes in the PDF tip below.)
[For an example that uses two footers (A and B) to hold the hyperlinks to the Contents page, see the Automating WordPerfect Templates PDF here. Note that the clickable links in the PDf's footers (and in some of its footnotes) is a small, blue, upward pointing triangle symbol (▲); also, all underlines were removed from hyperlinks in that document (see tip below).]
☼ If you add or delete material later — e.g. other hyperlinked sources or even regular body text or other matierial — you should re-generate the document (Tools, Reference, Generate).
This will ensure the links in a Table of Contents, Index, cross reference, etc., are updated to reflect correct pagination.
☼ When you use File, Publish to PDF to create a PDF from the current document ...
Note that the Publish to PDF dialog that appears has a Settings button (bottom right side). Click it, and under the Document tab verify that the options to "Include hyperlinks" and "Generate bookmarks" are enabled (ticked).
Be aware that choices made with the PDF dialog's Settings button are "sticky" between computer sessions. [For this and other tips about publishing to PDF see this page.]
Side notes and caveats:
¤ In some earlier versions of WordPerfect that had Publish to PDF feature, active hyperlinks did not always carry over well to the PDF, so users were often encouraged by other users to install a separate third-party PDF driver (a.k.a., a "virtual printer") on their systems that were known to work well with WordPerfect, such as PDF995, CutePDF, and others. [Many such third-party drivers exist today, and some programs (e.g., Quicken) even install their own PDF driver with the program to ensure you have one.]
¤ In recent versions WordPerfect versions, such as WordPerfect X8, Publish to PDF can more accurately maintain hyperlinks in the resulting PDF document — although links from some source items like graphic images still might not work because the PDF driver doesn't "see" them. Solution: Try using only text and/or WordPerfect symbols (Ctrl+W) as source links. Remember: It is always a good idea to test any PDF document before distributing it.
☼ To open commonly used files here's an old, "low tech" method.
Create a single document that contains hyperlinks to other files on your computer. Simply select some text or a graphic in that document (e.g., a description of a previously saved document) and then click Tools, Hyperlink to create a link to each file. (You can browse to select a particular document by clicking the Browse Folder icon adjacent to the Document/Macro name field in the Hyperlink Properties dialog.)
For easier access to this curated "navigation" document, create a top menu selection or a button on a toolbar to open it (see here). Then use the menu or button to open document whenever you need to select a particular listed document to open during that session. [Tip: Alternatively you could just add those common files as separate items on a new menu selection (see here) or a vertical toolbar (see this PDF for the method).]
☼ You can automatically create an link in a document by using a specially marked custom paragraph style or character style.
Apply the style to some text and you create a link to the target -- all in one step.
For example, to create a hyperlink from the document back to the Table of Contents (TOC) using a style, see here. Apply the style to a source word/phrase, and the link to the TOC is automatically made.
☼ Finally: If a hyperlink doesn't seem to work in the WordPerfect document, see "Why some hyperlinks (hypertext links) can fail to work while inside WordPerfect documents" here.
[...Continued from the Tips above:]
As noted above, when using Document/Macro field in the Hypertext Properties dialog you can
[A] use the program's default choice of "<current document>" to link to a specific bookmark in the current on-screen document;
[B] click on the Browse folder button to insert a chosen file name of a file previously saved on your disk in the Document/Macro field; be sure it inserts the full path and filename (and if the document is on a server use something like \\server\volume:\path\filename); also, if the target document has bookmarks (and that document was saved to disk) the bookmarks will display in the Bookmarks field and you can click on one to link to in that target document;
[C] type (or paste) a website address (URL) directly in the Document/Field; the adjacent Browse Web button can then be used to test that you have entered the desired URL; further, you can also type the name of a web page's bookmark ("anchor") to link to; or instead of a web page you could even use an email address (mailto:<address>) to open your email client, ready to write;
[D] click on the Browse folder button to insert a the path and name of an available macro you want to play when the hyperlink is clicked; alternatively you can type or paste the path and filename in the Document/Macro field.
Note that "...because browsers usually cannot play WordPerfect macros, hyperlinks to macros are not recommended in documents that will be published on the Web"
(- WordPerfect X8 User Guide).
The last 3 methods will change the dialog's Macro/Document field from the default entry of "<current document>" to the new file or address.
For our purposes here — i.e, linking to the Table of Contents or other area of the current document — you should use the program's default "<current document>" entry since you will want the hyperlink to take you to a specific bookmarked area in the currently open document, and not open up a document (even the same one) saved on disk.
With that default field entry, the program is smart enough to look for just the specified target bookmark in the on-screen document. (The program's WPX8 Help file is not particularly clear on this.)
This is an important distinction if you publish that document to PDF: When you open the resulting PDF, that PDF document will be the "current document," so the hyperlink embedded in it will be targeted to the PDF's own (bookmarked) Table of Contents — and not to the original (and now external) WordPerfect file.
If you made a mistake you can fix it: A quick and easy way to restore things is to simply open WordPerfect's Reveal Codes and delete the [Hyperlink] code for that particular source item. Then re-create the hyperlink from the source text to the relevant bookmarked target as described in the above example. If you have added or deleted material it's a good idea to re-generate the document (Tools, Reference, Generate) to ensure correct pagination. Finally, use Publish to PDF once again to replace the original PDF file.
[Continued from above...]
You can add highlighting to all hyperlinked text (hypertext) in the WordPerfect document and, as a result, in a PDF document created from that document.
But be aware that this hides the underline in the PDF file (a known bug since WPX4 and still present in WPX8), However the hyperlinks will still be active (assuming they were active in the first place) and since they will be highlighted they should be obvious links, depending on the color scheme you use for the hypertext text and the hypertext highlighting.
Highlighting might also be useful in PDF documents, especially where the highlighting is subdued — perhaps a light or pastel color — and the highlighted text is a complementary color.perhaps a light or pastel colorperhaps a light or pastel color
- - -
Here's how to modify the current document's Hypertext style to automatically add highlighting and/or change the color of all hyperlinked text.
[The Hypertext style is a built-in WordPerfect style. When you create hyperlinks (with Tools, Hyperlink) the Hypertext style's formatting is applied to the linked items. The Hypertext style is then listed in the Styles list (Format, Styles) for that document.]
Note that this modification applies to just the current document and to all hypertext in it, including links in a Table of Contents or Index. (If the latter effect is not wanted, you will have to manually add highlighting to the hyperlinked text on an item-by-item basis, the same way you would add italics, etc. If you want to do that, skip the rest of these instructions.)
To apply highlighting just to the Hypertext style wherever it appears in the document:
First you have to add the Highlight On/Off button tool to the regular "Selected Text" property bar so that it also shows up on the Styles Editor's own toolbar/property bar. Then you can use it to modify the Hypertext style for that document.
1. Ensure the Highlight On/Off button is visible on the main toolbar so that you can use a copy of it in step 3. (If it's not on your main toolbar you can add it there: see Customize your toolbars here.)
2. Place the cursor in the main document and select some text (any text will do). This should display the Selected Text property bar (if it's not visible, see here).
3. Copy the Highlight On/Off button from the main toolbar onto the Selected Text property bar: Hold down both the <Alt> and <Ctrl> keys while you (left-click) drag the button onto the property bar. Release the mouse button to drop it there. (Once there, you can relocate it on that property bar by holding down just the <Alt> key when you drag the button to a new position.)
Note: The button will stay on that property bar for future use, until to drag it from that property bar to remove it.
Tip: See here for more on customizing property bars by adding or copying an existing toolbar button to it.
Then, in a document with at least one hyperlink:
4. On the main <WordPerfect> menu (Tools, Highlight, Color), choose a highlight color (e.g., gray) and shading (e.g., 50%) with Tools, Highlight, Color.
5. On the main menu, click Format, Styles and click on the Hypertext style in the left pane.
6. Click Edit to open the Styles Editor. Be sure the box at the bottom of the Editor ("Show 'off codes'") is ticked.
7. Select all the codes in the Editor's Contents pane (use Edit, Select, All on the Editor's menu). While they are selected click on the (newly added) Highlight button on the Styles Editor's property bar to add the current highlight color. [Note that you can select a different color with the tiny drop arrow on the Highlight button; then click that button to apply the color.] A pair of [Highlight] codes should appear, bracketing (surrounding) the other codes.
Optional: If you want to also change the text color (or font or size) for all hyperlinked text, select all the codes again in the Contents pane and then click Format, Font from the Editor's menu (not the main WordPerfect menu). Choose a new color and shade (if desired), and/or a new font or size.
8. Close the Styles Editor with OK, then Close. All the hypertext links in the current document should be changed to the new scheme.
Tip: For this document and other documents you might want to use step 1 above to return the highlight color to your preferred color.