Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2017 by Barry MacDonnell. All Rights Reserved.

Page updated Aug 16, 2017

WordPerfect Tips
Main tips page | Browse tips
How to create hyperlinks (hypertext links) in WordPerfect

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

•  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

[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.

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: [1] bookmark the target and [2] 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, 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).


This example creates a hyperlink back to an existing Table of Contents (a "reverse link") but it should apply to other tasks.

First: Open Reveal Codes so you can observe the results of this method. Then follow these two steps.

Step 1:
Mark the target first.

•  Create a bookmark:

▸ Place the cursor in the document just above the Table of Contents area. This is where WordPerfect will go when the user clicks the reverse link.

Click on Tools, Bookmark, Create and give the bookmark a unique name, such as CONTENTS. You can use either UPPER and/or lower case.

Click OK to close the Bookmark dialog. This puts a [Bookmark] code in the document at the cursor location.

[Important:  In Reveal Codes, be sure the bookmark is located outside (i.e., above or to the left of) the [DefMark][GenTxt]...[GenTxt] codes so that it will not be accidentally deleted if you decide to re-generate the Table of Contents later. [The same goes for any header or footer codes you might add on the TOC page.]

Hence, if the separate page title above the TOC is "CONTENTS" (as we use in this example) then a good place for the bookmark code is just to the left of that word's first letter. It should then "travel" with the page title if you add or delete material above it.

Note that this caution about bookmark placement
also applies to any specially defined reference area in your document that can be regenerated during editing — including an Index or a WordPerfect List.

Each time you regenerate a Table of Contents, Index, or List, WordPerfect replaces their existing entries — i.e., everything between the pair of [Gen Txt] codes. See the tips on the TOC page under the Re-Generate! section here and the tip about using the Auto-generate option here.]

Step 2: Create the link from the source to the target.

•  In the main document:

Select the document text (or symbol or graphic) to use for the reverse link.

[This selection can be in the body text area, or inside a header or footer (see the "Using a header or footer..."  tip below) or other document "substructure" such as footnote, endnote, text box or graphic caption.]

Click on Tools, Hyperlink to open the Hyperlink Properties dialog.

Hyperlink Properties dialog

•  In the Hyperlink Properties dialog:

The Document/Macro field in that dialog should be set to the default of "<current document>".

[There are 3 other alternatives for that field that can contain various text characters — a document file name, a web address, or a macro file namebut they are not used here, For more on them see the first tip below.]

Note that deleting that field's contents is functionally the same thing as using "<current document>" insofar as our task of linking to a bookmark in the current document is concerned.]

Click on the Bookmark drop list button in that dialog to choose the existing bookmark name (e.g., CONTENTS) and place it in the Bookmark field. [You can type the name in the Bookmark field but the case of the letters might be important if you publish the document to the Web. In any case it's easier and less problematic to click on the name to choose it.]

Hyperlink Properties dialog with instructions

For this example, you should now see this:

Hyperlink Properties dialog with Bookmark field

Click OK to close that dialog.

Done. In Reveal Codes a pair of [Hyperlink] codes should now surround the previously selected item. The item immediately becomes a clickable link.


¤  In order to function inside a WordPerfect document, hyperlinks must be enabled (activated) in a document.

If they don't seem to work, see Tools, Settings, Environment, General [tab], Activate hyperlinks.

Also see "Why some hyperlinks ... can fail..." for other factors that can affect the operation of hyperlinks.

Note that even with the Activate hyperlinks setting disabled you can still create hyperlinks in the WordPerfect document and they will be active in a PDF if you create one from that document (with File, Publish to PDF).

¤  On the other hand, if you just want to use the mouse to quickly navigate between hyperlinks in a WordPerfect document:

For that purpose -

the Activate hyperlinks setting must be disabled (i.e., deactivated) so that clicking on a link will automatically display the Hyperlink property bar, which in turn will let you use two navigation buttons: Hyperlink Previous and Hyperlink Next;


[B] [even easier:] you can skip disabling the Activate setting and simply display the hyperlink property bar (a special toolbar) by right-clicking on any displayed toolbar and clicking on "Hyperlink Tools"; this gives access to the same bar with the
Hyperlink Previous and Hyperlink Next buttons. You can remove this toolbar the same way. [Note that these buttons do not search inside substructures such as headers, footers, footnotes. endnotes, text boxes, etc.]

Tips and notes on hyperlinking

☼  More about linking to a target in the Document/Macro field [see 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 (which are "repeating elements") for this purpose you only need to create the hyperlink once in any given header or footer you create. (For more on creating and using headers and footers see here.)

☼  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.

☼  You can quickly edit a hyperlink to change its target by double-clicking on its [Hyperlink] code in Reveal Codes.

This brings up the Hyperlink Properties dialog described in Step 2 above.

☼  You can remove underlines from hyperlinks in the current document, and/or change the color of the hyperlink's text (i.e., the hypertext), 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.

▸ Click Format, Styles, and select Hypertext in the 'Available styles' list. (Note: If no Hypertext style is present in the document, the style name will not appear.)

Then click Edit to open the Styles Editor.

▸ Delete the [Und] code in the Contents pane.

To change the text color, click in the Contents pane just after the existing [Color] code and then use Format, Font on the Editor's menu to open the Font properties dialog. Open the color picker and choose a color, then click OK.

Click OK to close the Styles Editor, then click Close.

Note that this method changes all hyperlink styles in the current document, even those that are used in cross references and to link the page numbers in a Table of Contents. (It's an all-or-nothing situation.)

To highlight the hypertext see Footnote 2.

To reset things back to the default, use Format, Styles, Hypertext, Options, Reset.

☼  To delete a particular hyperlink the easy way:

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.

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:
[1] open Reveal Codes, then [2] display the hyperlink property bar by right-clicking any toolbar and clicking Hyperlink Tools; [3] 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 the 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 create an automatic link in a document by using a specially marked custom paragraph style or character style.

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.

Footnote 1

[...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
Browse button with folder icon folder button to insert a chosen file name of a file 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 they will display in the Bookmarks field and you can click on the 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;


click on the Browse Browse button with folder icon 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.

But ...

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.

Footnote 2

[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  Highlight on-off button 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.