Change and fix hyperlinks

You can change the way a hyperlink looks, and you can change where it goes (its destination). When a hyperlink doesn't work, you need to determine what the problem is and then fix the address for the link's destination.

 Note   To change the text or order of hyperlinks on a navigation bar, click the navigation bar, and then click Navigation Bar Properties on the Format menu.

What do you want to do?



Change the way a hyperlink looks

Change the display text of a hyperlink

  1. Click the hyperlink text that you want to change.
  2. Type the new text, and then delete the original characters individually by pressing DELETE or BACKSPACE.

Remove the underline from hyperlink text

  1. Select the hyperlink text.

 Tip   To select only the underlined characters, click after the last underlined character and drag the cursor to the first character.

  1. On the Standard toolbar, click Underline Button Image.

Change the picture that you use for a hyperlink

  1. Select the picture that is linked.
  2. Right-click the picture, point to Change Picture, and then click the location of the new picture that you want to use. For example, click From File if you want to use an image that is stored on your computer.
  3. Select the new picture that you want to use.

Top of Page Top of Page

Change a hyperlink's destination

  1. Right-click the hyperlink that you want to change, and then click Edit Hyperlink.

 Note   If the shortcut menu offers commands only for spelling, click Ignore All, and then right-click the hyperlink again.

  1. In the Edit Hyperlink dialog box, enter the new hyperlink destination in the Address box.

Top of Page Top of Page

Change a hyperlink to regular text

  • Right-click the hyperlink, and then click Remove Hyperlink.

Top of Page Top of Page

Test hyperlinks before you publish your Web site

You can test a hyperlink to make sure that it works before you publish your Web site. Do one of the following:

  • To follow a hyperlink from your Web publication before you publish it to the Web, hold down CTRL while you click the linked text or picture.
  • On the File menu, click Web Page Preview, and then click any hyperlink in the preview of the Web site to follow it to its destination.

 Note   You cannot test links to external files from the preview of the Web site.

  • Publish your Web site to a local server to test the hyperlinks.
    1. On the File menu, click Publish to the Web.
    2. If you see an information box about a Web hosting service, click OK.
    3. In the Publish to the Web dialog box, locate the local server where you want to test your Web site, and then click Save.

Top of Page Top of Page

Fix hyperlinks that don't work

Here are some of the common fixes for hyperlinks that don't work.

Fix hyperlinks that go to other pages on your Publisher Web site

  • When one link doesn't work    When a page has been moved, Microsoft Office Publisher automatically updates hyperlinks to the correct page. If a hyperlink doesn't work, however, check that it's not pointing to a bookmark that has been moved or deleted. To fix it, do the following:
    1. Right-click the hyperlink, and then click Edit Hyperlink.
    2. In the Edit Hyperlink dialog box, click Place in This Document, and then click the page and the bookmark that you want to link to.

If the bookmark has been deleted, click Cancel. Go to the page that you want to link to and insert a bookmark, and then return to the hyperlink that you want to fix, and edit that hyperlink.

  • When many links don't work    If many of the hyperlinks don't work, some of your files may not have been published. By default, when you publish a Web site, Publisher uploads a subfolder called index_files to the specified file location. This folder contains all the files associated with your Web site except for the first page of the publication (the Web site home page), which points to the subfolder of associated pages. If the folder isn't available, hyperlinks to other pages in your publication won't work. If you use a third-party program to upload your Web site, the subfolder may not automatically upload to the Web server. In that case, upload the subfolder manually.

 Note   You can change the settings so that the next time you publish your Web site, Publisher doesn't create the index_files folder and publishes all files for your Web site to a single folder. In your Web publication, on the Tools menu, click Options, click the Web tab, and then clear the Organize supporting files in a folder check box.

Fix hyperlinks that go to other Web sites

If a hyperlink to another Web site doesn't work, browse to the destination that you want to link to. If the destination file is on the Internet, search for it in your Web browser. If the file is on your hard disk or a network, search for it in Microsoft Windows Explorer. Then, in your Publisher Web publication, check for the following:

  • The destination might have moved or might not exist anymore    Right-click the hyperlink, and click Edit Hyperlink. In the Edit Hyperlink dialog box, verify that the path to the destination page is correct.
  • The text that you believe is a hyperlink only looks like a hyperlink    Select the text and click Insert Hyperlink Button image on the Standard toolbar to make sure that the text is a hyperlink.

 Tip   Be sure to select a single hyperlink before you click Insert Hyperlink. When you select more than one hyperlink or a hyperlink on a navigation bar, Insert Hyperlink might not be available.

  • You might not have access to the destination    If the destination is on the Internet, make sure that you have a connection to the Internet. If the destination is on a network, contact your network administrator to ensure that you have access to the destination file.

Fix hyperlinks that open external files

When you create a hyperlink on a Web page that opens an external file, such as a Microsoft Office Word document, a Microsoft Office Excel worksheet, or a PDF file, keep the following in mind.

File names

Ideally, file names for external files that you link to should not include spaces and should be in lowercase letters.

If you link to a file that has a space in its name and you can't change the name, check to make sure that Publisher has replaced the space in the hyperlink address with %20. For example, if the file name is my file.docx, the hyperlink address should be my%20file.docx.

Testing

You can't test a link to an external file in Web preview, but you can test a hyperlink from your publication by holding down CTRL while you click the linked text or picture. You can also publish your Web site to a local server to test the hyperlinks to external files.

 Important   If you are testing links to external files on a local server, be sure to copy the external files up to that local server.

Uploading

When you publish your Web site, you must upload the external file manually. Publisher won't upload it for you. Where you place the external file on the Web server determines the path. For example:

  • If you link from the home page to a file that is in the same directory on the Web server, the path can just be the file name (for example, myfile.docx).
  • If the file is in a different folder from the home page, the path must include the folder name (for example, index_files/myfile.docx).

You have to determine this path and type it in the Insert Hyperlink dialog box before you publish to the Web. Select the text or picture that you want visitors to your page to click to open the external file. On the Insert menu, click Hyperlink. In the Insert Hyperlink dialog box, in the Address box, type the path to the external file.

 Note   If you insert a hyperlink path in the Address box by browsing to it, change the path by typing the file name only or the folder and file name, as noted above.

Fix the link path to a file that is on a disk

You might want to put the files for your Web site on a disk, such as a CD or DVD, so that your Web site can be viewed on another computer before you publish it to the Web. If you copy your Web publication files to a disk, the links will not work. Instead, be sure to publish the Web site directly to the disk. Here's how:

In Windows Vista

  1. On the File menu, click Publish to the Web.
  2. In the Address bar, click the drive for the disk where you want to publish your Web site, such as D:\mywebsite.

 Note   If you want to add your Web site to a new folder, click New Folder on the toolbar to create a new folder, type a name for the new folder, and then press ENTER.

  1. In the File name box, select index as the default name for your home page, and then click Save.

 Note   Index.htm is the default selection. Selecting index as the name of your home page makes it easier to access and prevents users from viewing a list of the files that make up your Web site.

In Windows XP

  1. On the File menu, click Publish to the Web.
  2. In the Save in list, click the drive for the disk where you want to publish your Web site, such as D:\mywebsite.

 Note   If you want to add your Web site to a new folder, right-click where you want to add a new folder, select New, click Folder to create a new folder, type a name for the new folder in the Name box, and then click Open.

  1. In the File name box, select index as the default name for your home page, and then click Save.

 Note   Index.htm is the default selection. Selecting index as the name of your home page makes it easier to access and prevents users from viewing a list of the files that make up your Web site.

Fix a hyperlink that does not appear

This can be caused by one of the following:

Top of Page Top of Page

 
 
Applies to:
Publisher 2007