Keeping a Document Open After Hyperlinking

Written by Allen Wyatt (last updated May 1, 2021)
This tip applies to Word 97 and 2000

If you use Word 97 or Word 2000, you can create hyperlinks in your documents. These links can be to either Internet resources or to other documents to which you have access. As documented in other WordTips issues, you create hyperlinks by using the Insert Hyperlink tool on the toolbar.

There can be a problem with hyperlinks, however. Subscriber Robin McLeod wrote to describe a problem that popped up with hyperlinks. If the hyperlink was to an Excel workbook, the workbook would open and then the Word document that contained the hyperlink would close. (Word would remain open, but the document itself would close.) Other subscribers wrote to say that they had observed the same behavior on their systems. It seems that this behavior is only present in Word 97, and not in Word 2000.

Actually, the behavior is a little more odd than what is described here. In reality, Word 97 closes the document if its "dirty" flag is not set. In other words, if there are no unsaved changes in the document, then it closes. If the document has been changed and not saved, then the document remains open after clicking on the hyperlink.

The solution to this problem is in the way in which the hyperlink itself is put together. Let's say you were linking to an Excel workbook called MyWorkbook. If you took a look at the field that created the hyperlink, it would look like the following. (You can look at the field code by positioning the insertion point just to the left of the hyperlink and then pressing Shift+F9.)

{ HYPERLINK "MyWorkbook.xls" }

When you click on this link, Word tries to load the target of the link into the current document window. In order to do that, it closes the current document. When it figures out that the target is an Excel workbook, it opens Excel, but the original Word document is still closed. (This behavior is sort of like moving from one Web page to another. When you click on a hyperlink, the old Web page is discarded and the new one is loaded.)

What you need to do is modify the hyperlink field so it looks like this:

{ HYPERLINK "MyWorkbook.xls" \n }

The \n switch causes Word to open the hyperlink target in a new window. Again, this is sort of like the "Open in New Window" command open on several different Web browsers. Word dutifully leaves the original document open (whether it has been saved or not) and opens the target in its own window.

Again, this "fix" is only necessary in Word 97. In Word 2000 the target of the hyperlink is always opened in a new window, and the original document remains open. Thus, it would appear that there is no real need for the \n switch for the hyperlink field in Word 2000.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1421) applies to Microsoft Word 97 and 2000.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Can't Open a Word Document in Windows

Double-click on a Word document while using Windows Explorer, and the Word program should start with the document ...

Discover More

Excel Serious Sorting (Special Offer)

Excel Serious Sorting shows you how to put your data into the order that makes best sense. Increase your ...

Discover More

Getting Pictures Out of Word

If you receive a Word document from someone, you may want to get any graphics it contains into their own files. You can ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Stopping Word from Accessing the Internet

When you start Word, does it try to access the Internet? It may, depending on how your version of Word is configured. If ...

Discover More

Weird Hyperlink Behavior

When you insert a hyperlink, you expect it to look like, well, a hyperlink. But what if it really looks like some strange ...

Discover More

Associating a Name with a Position

Wouldn't it be great if Word allowed you to have a small pop-up that showed you some information associated with a ...

Discover More

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is eight more than 2?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.


FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.