Chiang Mai, Thailand, 23 January 2022 : Microsoft word app on smartphone screen.
Image: Sai/Adobe Stock

Hyperlinks allow users to access another location in the current Microsoft Word document, another document or web page. Inserting hyperlinks is a simple task, but you can run into trouble when inserting hyperlinks to external files. Word supports two kinds of hyperlinks: Absolute and relative. Using the right one when linking to an external file is critical.

SEE: Google Workspace vs. Microsoft 365: A side-by-side analysis w/checklist (TechRepublic Premium)

In this tutorial, you’ll learn the difference between absolute and relative hyperlinks in Word, so you can apply them correctly. I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions of Word.

The difference between absolute and relative in Word

If you’re not familiar with hyperlinking, there are terms that might not be familiar, so let’s quickly review.

A hyperlink is specially formatted content that responds to a click by opening a file, a web page or moving the cursor to another location in the same file. By default, Word underlines hyperlinks and changes the linked text blue, but will also coordinate with the document’s theme colors. Hyperlinks in a Word document change color once you click them to denote that you’ve used them.

An absolute hyperlink contains the full address of the target file or web site, such as https://techrepublic.com. Use these when linking to a web page or file that is outside your domain.

A relative hyperlink contains an address that is relative to the current domain or file location. They only contain the name of the target page prefixed with the necessary folder path to reach the target file.

Now let’s move on and insert a few hyperlinks into a Word document.

How to quickly insert hyperlinks in Word

Word is smart enough to recognize a URL or email address and responds by formatting the address as a hyperlink. Entering the address is the only task you have.

For instance, in a Word document, type https://techrepublic.com and press Enter. Word will immediately format it as a hyperlink as shown in Figure A. Clicking the hyperlink will take you to the TechRepublic homepage. This is an absolute link; it will always take you to the same place unless that page no longer exists.

Figure A

Enter a URL and Word automatically applies the hyperlink format.

On the surface, hyperlinks display the full URL address or descriptive text. If you want to change the hyperlink’s text, right-click it and choose Edit Hyperlink from the resulting submenu. In the resulting dialog, change the text in the Text to Display control to TechRepublic, as shown in Figure B.

Figure B

Change the hyperlink’s display text.

Figure C

The hyperlink no longer displays the URL.

When you want to link to another location in the current document, you’ll use the same interface to add a hyperlink to a heading or bookmark that’s in the same document. To demonstrate this behavior, you’ll need a Word document with heading text that you’ve styled with one of the built-in headings, such as Heading 2. To accomplish this, do the following:

  1. First, enter heading text, Section Two, and apply the Heading 2 style. This is the spot the hyperlink will lead to.
  2. Position your cursor where you want to add the hyperlink that links to the Section Two heading — on another page or several pages away.
  3. Enter the hyperlink text Section Two and right-click it.
  4. Select Link in the resulting submenu.
  5. In the resulting dialog, click Place In This Document (Figure D).
  6. In the list, click Section Two.
  7. Click OK.

Figure D

Hyperlink the text.

After adding the hyperlink, you can click it to go to the Section Two heading. This is a relative hyperlink. If you add or delete pages, the hyperlink knows where the Section Two heading is, and you don’t need to update the hyperlink itself.

It’s easy to insert a relative hyperlink and not even know it. When that happens, the link might not work correctly after you distribute the document.

How to use absolute hyperlinks in all new Word documents

One way to make sure hyperlinks always find the right target outside your domain is to use absolute hyperlinks. In fact, you can even force Word to use absolute hyperlinks as follow:

  1. Click the File menu and select Options.
  2. In the left pane, click Advanced.
  3. In the General section, click Web Options.
  4. Click the Files tab.
  5. Uncheck the Update Links On Save option (Figure E).
  6. Click OK twice.

Figure E

Uncheck this option to use absolute hyperlinks in all Word documents.

Unchecking this option will protect absolute hyperlinks that point to files within your local system. This option is an application-level option, so your choice impacts all future Word documents. However, the truth is that this is an extreme setting you’ll use only when you’re not working as part of a larger organization. If not, you might want a more flexible choice.

How to use absolute hyperlinks in the current document

If you know that you’ll always want to use absolute hyperlinks going forward, setting the application-level option is a reasonable choice. If absolute hyperlinking is something you’ll do in some documents and not others, you can set a document-level option as follows:

  1. Click the File tab and then click Info.
  2. From the Properties dropdown, choose Advanced Properties.
  3. Click the Summary tab.
  4. In the Hyperlinks Base control, enter the absolute path you want for all hyperlinks in this document (Figure F).
  5. Click OK.

Figure F

Enter an absolute path in the Hyperlinks Base option.

This property can be a bit confusing because you’re not forcing every hyperlink to be absolute; you are forcing every hyperlink to be absolute using the same path. Knowing the difference between relative and absolute hyperlinks can prevent failures when linking to documents outside your domain.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays