Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FollowHyperLink Fails (Word 2000 VBA)

    Peculiar. I know this worked in a previous build. But now, both on my Win2k Server/Word 2000, and a Win98/Word 97 workstation linked to the net via ICS, the following fails:
    <pre>Private Sub lblHompage_Click()
    ActiveDocument.FollowHyperlink Address:="http://www.indelibleink.com", NewWindow:= _
    True, AddHistory:=True
    End Sub
    </pre>


    I get an error:

    Runtime error '-2147418111 (80010001)':

    Method 'FollowHyperlink' of object '_Document' failed

    Am I missing something? Is there a better way to launch a web site from a from?

    Regards

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: FollowHyperLink Fails (Word 2000 VBA)

    Guy,

    I tried the code you posted on Win 98 & Office 2000 and Win XP with Office XP and had no problems,, so the problem might be related to some local configuration issues.

    For an alternate method using ShellExecute see This Thread

    Andrew C

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FollowHyperLink Fails (Word 2000 VBA)

    Even weirder, the exact code from a module works fine, but from a form, fails.

    Can't figure what I'm missing.

    In the mean time the ShellExecute solution seems to work.

    Thanks,

Posting Permissions

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