Tricks of the Microsoft Office Gurus

Although it has been around for a while, one of the most interesting innovations in Office is still the capability to create hyperlinks in any kind of Office document: Word documents, Excel worksheets, Access databases, PowerPoint presentations, and even Outlook email messages. This section shows you the various techniques available for inserting hyperlinks in Office documents.

Hyperlinks and Word

Word accepts hyperlinks within the body of a document. This lets you create active documents that allow the reader to click special text sections and "surf" to another document, which may be on the Web, your corporate intranet, or your hard drive.

For example, consider the Word document shown in Figure 8.8. As you can see, the phrase "amortization schedule" is displayed underlined and in a different color (blue). This formatting indicates that this phrase is a hyperlink. Hovering the mouse pointer over the hyperlink displays a ScreenTip with the linked address and the message CTRL+click to follow link. Holding down Ctrl and clicking this link displays the linked Excel worksheet, as shown in Figure 8.9. (Yes, you Ctrl+click a Word hyperlink instead of just clicking as you would in a web browser. That's because you might need to position the cursor inside the link text, and to do that with a mouse you need to be able to click the text.)

Figure 8.8. A Word document containing a hyperlink.

Figure 8.9. Holding down Ctrl and clicking the hyperlink displays this Excel worksheet.

Word gives you three methods for constructing a hyperlink:

  • Using Word's AutoCorrect feature to create links automatically.

  • Entering the appropriate information by hand.

  • Pasting information from another document.

The next few sections discuss each method.

Using Drag and Drop to Create a Hyperlink

Word gives you a fourth method for creating a hyperlink: drag and drop. Right-click and drag a file from a folder window, a link from a web page, or an address displayed in the Internet Explorer Address bar (actually, you right-drag the page icon that appears on the left side of the Address bar). Drop the object inside a Word document and, in the shortcut menu that appears, click Create Hyperlink Here.

Creating a Hyperlink Using AutoCorrect

The easiest way to create a hyperlink in Word is to type the address into your document. As long as the address is a network path or an Internet URL, Word will convert the text into a hyperlink, no questions asked.

If this doesn't work for you, you'll need to turn on this feature by following these steps:

1.

Select Tools, AutoCorrect Options to display the AutoCorrect dialog box.

2.

Display the AutoFormat as You Type tab.

3.

Activate the Internet and Network Paths with Hyperlinks check box.

4.

Click OK.

Creating a Hyperlink from Scratch

For more control over your hyperlinks, you need to use Word's Insert Hyperlink feature, which lets you specify not only linked documents, but named locations within documents (such as a named range within an Excel worksheet). Here are the steps to follow:

1.

Either select the text that you want to use for the hyperlink or select the position in the document where you want the link to appear. Note that if you don't select any text beforehand, the link text will be the hyperlink address.

2.

Select Insert, Hyperlink, or click the Insert Hyperlink button in the Standard toolbar (refer to Figure 8.8; you can also press Ctrl+K). Word displays the Insert Hyperlink dialog box, shown in Figure 8.10.

Figure 8.10. Use the Insert Hyperlink dialog box to create your hyperlinks from scratch.

3.

Use the Text to Display box to edit the link text, if necessary.

4.

To set the ScreenTip text, click ScreenTip, type the ScreenTip text, and click OK. Note that this replaces the address that Word displays in the ScreenTip by default. Word still displays the CTRL+click to follow link message in the ScreenTip.

5.

Use the Address text box to specify the name of the file or web page that the users jump to when they Ctrl+click the link. You can enter any of the following:

  • A path to another Word document

  • A path to a document from a different application on your hard drive

  • A path to a multimedia file (such as a sound or video file)

  • A network (UNC) path to a document on your company's intranet

  • A URL on the World Wide Web

6.

If you want to link to a specific part of the file, you can do so in Word by linking to a bookmark. Click Bookmark, select the bookmark you want to link to, and click OK.

7.

Click OK to insert the hyperlink.

Working with Hyperlinks

If you right-click a hyperlink, the shortcut menu that appears contains the following commands:

  • Edit Hyperlink Displays the Edit Hyperlink dialog box, which is identical to the Add Hyperlink dialog box.

  • Select Hyperlink Selects the hyperlink text.

  • Open Hyperlink Opens the linked document.

  • Copy Hyperlink Copies the hyperlink to the Clipboard.

  • Remove Hyperlink Deletes the hyperlink.

Pasting a Hyperlink in Word

The final method for creating a hyperlink is to paste an object from the Clipboard. That is, you copy an object to the Clipboardit could be a section of text, an Excel range, some records from a tableposition the cursor where you want the link to appear, and then select Edit, Paste Hyperlink. When you click this hyperlink, not only does Word load the application and document from which you copied the information, but it also moves to the spot in the document where the information resides.

Hyperlinks and Excel

Working with hyperlinks in Excel is similar to working with Word in that you have three main methods for inserting a hyperlink:

  • Using AutoCorrect to create the link automatically. That is, you type a web address or network UNC path into a cell (don't type anything else) and AutoCorrect converts the text to a link.

  • Entering the appropriate information by hand using the Insert, Hyperlink command. In Excel's version of the Insert Hyperlink dialog box, click Bookmark to specify either a range or range name as the target.

  • Copying information from another document and then using the Edit, Paste as Hyperlink command.

The AutoCorrect option converts the address text to a HYPERLINK worksheet function. Here's the general format for this function:

HYPERLINK(link_location [,friendly_name])

link_location

The URL, local path, or network path of the document you want to link to.

friendly_name

(Optional) The text that will appear in the cell. If you omit this argument, Excel displays the link_location text, instead.

For example, the following formula sets up a link to the Budget.xls workbook in the \\Server\Public folder and displays Budget Workbook in the cell:

=HYPERLINK("\\Server\Public\Budget.xls", "Budget Workbook")

Hyperlinks and Access

Unlike with Word and Excel, you can't just insert hyperlinks into Access at random. Instead, to work with hyperlinks in Access tables, you have to create a special field. Specifically, you have to create a field that uses the Hyperlink data type. If you're experimenting with the Northwind sample database that ships with Access, check out the Suppliers table, shown in Design view in Figure 8.11, for an example of a Hyperlink field.

Figure 8.11. To add hyperlinks to an Access table, you need to create a field that uses the Hyperlink data type.

Inserting a Link Field in the Datasheet View

Rather than use Design view to add a Hyperlink column, you can do so quickly from Datasheet view by selecting Insert, Hyperlink Column.

After the Hyperlink field is in place, you have two options for inserting a hyperlink into a cell:

  • Select the cell and then type the URL, path, or network path for the document to which you want to link.

  • Select the cell and then select Insert, Hyperlink to use the Insert Hyperlink dialog box to specify the link.

After the link is in place, click the cell to jump to the specified document. Figure 8.12 shows the Northwind Suppliers table with a few hyperlinks added.

Figure 8.12. The Suppliers table with some sample hyperlinks.

When working with Access hyperlinks, bear in mind that some of the normal Access editing methods don't apply. For example, you might normally edit a cell by first clicking it to get the insertion point cursor and then making changes. With a Hyperlink field, however, you can't get the cursor by clicking (because that just activates the link). Instead, you need to select the cell and press F2.

Also, you need to be careful when you're editing a hyperlink. In general, Access hyperlinks take the following form:

friendly_name#link_location#

For example, suppose you enter the following into a cell:

Click here to load the memo#C:\My Documents\memo.doc#

Access will display only Click here to load the memo in the cell.

Access ignores anything you enter after the last pound sign. So if you're adding to the address, make sure you do it within the pound signs. Note, however, that anything before the first pound sign is used as link text. So instead of displaying, for instance, a URL, you can enter a description or name.

Hyperlinks and PowerPoint

You can also use two methods to add hyperlinks to your PowerPoint presentations:

  • The Insert, Hyperlink command Select some text or an image and then select this command (or click the Insert Hyperlink button on the toolbar). PowerPoint will display the usual Insert Hyperlink dialog box. Note that if the document you're linking to is a PowerPoint presentation, click Bookmark to select a slide.

  • Pasting an object as a hyperlink As with the other Office programs, you can copy data to the Clipboard and then select Edit, Paste as Hyperlink to insert the data as a hyperlink.

From Here

  • Another way to put Office documents on the Web is to use a SharePoint site. In Chapter 7, see the section titled "Using SharePoint to Collaborate on Office Documents."

  • Document hyperlinks can cause privacy breaches if they contain the addresses of sensitive or private locations. To learn how to remove hyperlinks before sharing a document, see the section in Chapter 14 titled "Removing Hyperlinks."

Категории