I insert a hyperlink in the Word document, which links to another Word
document. When I kick the hyperlink to open the second document, I want
to close the orginal document (so I have only one Word document open).

Is this possible? Thanks in advance.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

Re: Hyperlink in Word Document by Greg

Greg
Sun Jan 11 16:57:28 CST 2004

Birdmeng,

I have never tried this before, but I created an AutoOpen() macro in the
hyperlink target document as follows:

Sub AutoOpen()
Documents("D:\My Documents\Word Documents\Test.doc").Close
End Sub

When the target document opens it save changes and closes the source
document. You would have to provide your own document path and name.

--
Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
To e-mail, edit out the "w...spam" in gmaxey@whamspammvps.org

birdmeng wrote:
> I insert a hyperlink in the Word document, which links to another Word
> document. When I kick the hyperlink to open the second document, I
> want to close the orginal document (so I have only one Word document
> open).
>
> Is this possible? Thanks in advance.
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~View and post usenet messages directly from
> http://www.ExcelForum.com/