Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Extracting URLs from Word documents (MS Word 2002 SP2)

    I would like to know if anyone has a macro for a

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Extracting URLs from Word documents (MS Word 2002 SP2)

    Does this do what you want?
    <pre>Public Sub DisplayHyperlinkText()
    Dim hypNext As Hyperlink
    For Each hypNext In ActiveDocument.Hyperlinks
    hypNext.Range.InsertAfter " [" & hypNext.Address & "]"
    Next hypNext
    End Sub
    </pre>

    It definitely doesn't do the right thing if you run it twice, that would need much more work.
    It also doesn't do anything to hyperlinks in headers, footers, textboxes etc, only the main story.

    StuartR

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extracting URLs from Word documents (MS Word 2002 SP2)

    This does exactly what I wanted. You saved me hours of work! Thanks-a-million!

    Matt

Posting Permissions

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