Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate |
![]() Toolbox for WordPerfect |
||
Macros, tips, and
templates for Corel® WordPerfect® for Windows® |
Page updated Jan 21, 2025 |
|
WordPerfect
Tips Main tips page | Browse more 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; how to change or remove 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 your own active links to • another part of the current document
• a different document on your disk (or server) • a folder on your system, • a website page • your email program's creation (compose) screen • launch an available macro.
Because the first item 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 that document (or a PDF document created from it) and provides some tips.
The other items are mentioned below, but they are not the primary focus of this article. Note
Several built-in 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, too. But again, they are not the main focus here. ■ 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 then [2] create a hyperlink to it at the source location(s). An example of how to create such a hyperlink
is given below, using the common task of linking to a Table of Contents (TOC)
in the document from one or more document locations.
Generally, a source location — there can be more than one in the document — can be in the main body text area or inside a "substructure" such as a header, footer, footnote, endnote, text box or graphic caption.
Tip
Using a header or footer as the source means the link will be visible and active on any page where that header or footer is displayed. For some document designs this can be very useful, but be sure not to create a header or footer inside the defined TOC (or List or Index) area after you create (or generate) that reference area, for the reasons noted in Step 1 of the example below (and here). The target for the source's hyperlink is a WordPerfect bookmark, usually placed at the beginning of the relevant area with Tools, Bookmark, Create. When the hyperlink is created or regenerated (Step 2 below), 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 removed, changed or augmented if desired (see the Tips and notes section below). ■ Example This example creates a hyperlink from a document location back to an existing Table of Contents (a "reverse link"), but the basic method should apply to other tasks.
■ 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 (or folder) on your system.
▸ Similarly, you could also have a hyperlink open a Web address in your computer browser (or open your email program with the recipient's email address filled in). ▸ Finally, you could have a hyperlink play a macro. These 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.
Notes
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.) Here's how. [1] 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.)
[2] 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.)] [3] 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: [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 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.
☼ Macro writers: See the Hypertext command in WordPerfect's Help, Macro Commands -- and related commands such as HypertextCreate.
• For example, to create a link from some selected text to a bookmark, here's a snippet that should work. Be sure to change "BookmarkName" to an actual bookmark name in the document. Note that the snippet does not check to ensure the specified bookmark exists.
If (?BlockActive=False) Messagebox(;;"Select some text first!") Quit Endif // ...The next command should be all on one line... HyperTextCreate (Action:GoToBookmark!; Bookmark:"BookmarkName"; Display:HighlightedText!) • To create buttons in the document that link to various things -- including bookmarks -- see Klaus Pfeiffer's macro on WordPerfect Universe here. ☼ 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" on this page. |
|
Footnote 1 [...Continued from the Tips above:] What are you hyperlinking to? Some options - As noted above, when using the Document/Macro field in the Hypertext Properties dialog you can [OPTION A] accept the program's default choice of "<current document>" to link to a specific bookmark that exists in the current (i.e., on-screen) document; or [OPTION B] click on the Browse ![]() or [OPTION C] type (or paste) the full website address ("http<address>or "https<address>") directly in the Document/Field; the adjacent Browse Web button can then be used to test that you have entered the desired address (URL); further, you can also type the name of a web page's bookmark ("anchor") to link to; or instead of a web page address you could use an email address ("mailto:<address>") to open your email client, ready to write; or [OPTION D] click on the Browse ![]() Note that "...because browsers usually cannot play WordPerfect macros, hyperlinks to macros are not recommended in documents that will be published on the Web" (source; WordPerfect X8 User Guide).
The last 3 methods (B,C, and D above) will change the dialog's
Macro/Document field from the default entry of "<current
document>" to the new file's name or location. [See Note 2 below for how to link to a folder — i.e., to open the folder and not any specific file in that folder.]
But:
For our purposes in the example used above — 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. Note 2: Instead of linking to a specific file name in the Hypertext
Properties dialog's Macro/Document field, you can link to a specific Windows folder with a small edit:
Click on the Browse
![]() When the name is inserted in the Macro/Document field (by default it should show the full path and filename), edit that field and [1] add the word File: (or File:// if the source .wpd document will be converted to a .pdf document) to the beginning of the string of characters, and [2] delete the temporary filename from the end of the string. For example, if I want the link to open the C:..\Documents\Clients folder on my computer, I might first select a file in that folder like this: C:\Users\Barry\Documents\Clients\JaneDoe2022.wpd
I would then edit the field to look like this: File:C:\Users\Barry\Documents\Clients
(Obviously, replace "Barry" above with your own Windows user name.)
Related tips and cautions: - You can also manually type or paste that File:... string into the Macro/Document field rather than selecting and editing it with the Browse button. - If the path is not correct the program will not alert you: the link will simply fail to work. So the first step in troubleshooting such an issue is to verify the Document/Macro field for accuracy. [Hyperlinks can fail for other reasons; see here.] - If the source file is to be created (Published) as a PDF, the result of clicking the hyperlink in the PDF might not open a Windows File Manager / File Explorer window. Instead, it might open the linked file in a new browser tab. (This appears to be related to the particular browser.) You should experiment with the above link syntax and test it to ensure it does what you want. Related tip: Consider making the link open a specific document, not a folder. [Thanks go to Kenneth Hobson in a 2022 post on WordPerfect Universe for this method.] 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.) First: 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 ![]() 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. |