Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink issue (Word 97)

    Hi,

    We have two word documents doc1 & doc2 both have hyperlinks to each other, what we need is when we click hyper link in doc1 it should close doc1 and show only doc2. Similarly when we click hyperlink in doc2 it should close doc2 and invoke doc1.

    How to go abt this.

    Thanx

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hyperlink issue (Word 97)

    Hello Phil,

    I have Word 97 (SR2 Dutch). Clicking a hyperlink to another Word document leaves the original document open, regardless of the absence/presence of the /n switch, and regardless of the "Browse in same window" setting.

    Regards,
    Hans

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink issue (Word 97)

    Hi extreme:
    I do not have Word 97 available to check this. However, I thought that the default in 97 was to close the document & the problem was to keep the original document open. Try this:
    1. Press Alt+F9 to view the field codes of the hyperlinks.
    2. Look for a /n switch.
    3. If it's there, delete it & then press F9 to update the fields.

    If that doesn't work, do you have this option in Word 97? Go to Start/Settings/FolderOptions/FileTypes tab & scroll to locate Microsoft Word Document. Then check the box I have circled.

    Hope this helps.
    Attached Images Attached Images

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hyperlink issue (Word 97)

    I'm not an expert in this, so others may have better ideas.

    As far as I know, you can't attach code to hyperlinks.

    What you might do, is the following:

    (1) Write a macro

    Sub FollowLink()
    ActiveDocument.FollowHyperlink Address:="documentname", SubAddress:="bookmarkname", NewWindow:=False
    .Close SaveChanges:=False
    End With
    End Sub

    Substitute the appropriate document name and bookmark name.
    If you don't want to jump to a specific bookmark in the document, omit the SubAddress argument.

    (2) Instead of a hyperlink, use a MACROBUTTON field:
    <UL><LI>Type Ctrl+F9 to insert field brackets { } (don't type them yourself!)
    <LI>Within the brackets, type MACROBUTTON FollowLink Click here
    <LI>It should look like
    { MACROBUTTON FollowLink Click here }
    (replace Click here by the text you want to be displayed)
    <LI>Right click the field to hide the field code.[/list](3) By default, the user will have to double click the macro button.
    If you want to activate it by a single click, add the following macro:

    Sub AutoOpen()
    Options.ButtonFieldClicks = 1
    End Sub

    HTH,
    Hans

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink issue (Word 97)

    <P ID="edit" class=small>Edited by Phil Rabichow on 19-Jul-02 09:26.</P>Hi Hans:
    Yes, I was thinking of a document closing when the hyperlink is to a web page, as described here. There was a solution to that problem in <!post=this post,76745>this post<!/post>. However, that won't work here. [Wish I knew why there was so much white space on my attachment. It didn't look that way in Irfanview.]

    Later: whoops! There's only a large white space when viewed in Netscape, not IE.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Hyperlink issue (Word 97)

    You could put an AutoOpen macro in Doc2 to check whether Doc1 is open and, if it is, close it. This assumes that the file name is always the same.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •