Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Aug 2001
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlinks - unc or actual path (word 97 sr2)

    Hi,
    I've written a macro that will insert a hyperlink into the activedocument, so that the user can then click on it to open windows explorer at the current documents folder. When I retrieve the activedocument path it is displayed as the drive letter e.g. g:temp. However, when I add the hyperlink to the document it appears as the unc path e.g. europetemplatestemp.
    I would like to display the field result with the drive letter, rather than unc, but can't find a way using VBA to do this.

    This is the current code:
    Dim curpath As String, hlink As Hyperlink
    curpath = ActiveDocument.Path
    ActiveDocument.Hyperlinks.Add Address:=curpath, _
    Anchor:=Selection.Range

    Does anyone have the answer? I've tried looking through other threads, but couldn't see anything...
    thanks,
    Oliver

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Hyperlinks - unc or actual path (word 97 sr2)

    I thought you might be able to rewrite it once created but the Address property is Read Only.

    Is it possible to use a FollowHyperlink macro instead of creating a hyperlink?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

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