Quantcast
Channel: ShaunaKelly.com » Word and Excel
Viewing all articles
Browse latest Browse all 3

How to create a hyperlink from a Word document to an Excel workbook

$
0
0

You can create a clickable hyperlink in a Word document that will open up an Excel file. Sometimes you just need to open the Excel workbook. Sometimes you want the link to go to a specific place in the Excel workbook. This page explains how.

How to create a link to an Excel workbook

In your Word document, do ctrl-F9. Within the braces that word gives you, type the following:
HYPERLINK "C:\\My Documents\\MyExcelFile.xls"

So it looks like
{ HYPERLINK "C:\\My Documents\\MyExcelFile.xls" }

But note that you can't type the { } braces by hand. You must use ctrl-F9 and type between the braces that Word gives you.

Obviously, you need to replace the text between the quote marks with your own folder and file name. Be sure to use double back slashes ("\\") in your path name.

When you're finished, press F9, which toggles between displaying the field codes (that you just typed) and the field result (which is the hyperlink).

When you click the link, Excel will run and will open your Excel workbook.

How to create a link to a specific place in an Excel workbook

You have two choices here. You can choose to link to an absolute address. Or, you can link to a range name.

How to link to an absolute address in an Excel workbook

In your Word document, do ctrl-F9. Within the braces that Word gives you, type so that it looks like the following:

{ HYPERLINK "C:\\My Documents\\MyExcelFile.xls#MySheet!A1" }

If your sheet name contains a space, then you need to enclose it in single quote marks, like this:

{ HYPERLINK "C:\\My Documents\\MyExcelFile.xls#'My Sheet'!A1" }

Alternatively, you can use the \l (that's a lower-case L) switch to identify the range name:

{ HYPERLINK "C:\\MyDocuments\\MyExcelFile2.xls" \l "'Sheet 1'!A1" }

How to link to a range name in an Excel workbook

To create a hyperlink to a Worksheet range name, use use ctrl-F9 and type so it looks like the following:

{ HYPERLINK "C:\\My Documents\\MyExcelFile2.xls#'Sheet 1'!RangeName" }

To create a hyperlink to a Workbook range name, use use ctrl-F9 and type so it looks like the following:

{ HYPERLINK "C:\\My Documents\\MyExcelFile3.xls#RangeName" }

However…..

Word wouldn't be Word if it were always that straight-forward! Excel gets confused if you have both a Workbook range and a Worksheet range with the same name. It seems to link to the range randomly. So, if you use range names, make sure they're all sheet-specific or all workbook-wide. Or use an absolute address.

How to add a screen tip to a hyperlink

You can use the \o switch (that's a lower-case O, not a zero) to create a tooltip, like this:

{ HYPERLINK "C:\\My Documents\\MyExcelFile3.xls#RangeName" \o "Click here to open MyExcelFile3" }


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images