Groups | Search | Server Info | Login | Register
| Newsgroups | microsoft.public.word.programming, comp.sources.d |
|---|---|
| Date | 2013-04-25 17:11 -0700 |
| Message-ID | <7649555a-393b-4e97-b0f0-fdec0a03457a@a3g2000vbr.googlegroups.com> (permalink) |
| Subject | Word Macro to Extract Hyperlinks from a document |
| From | sandeep6699@yahoo.com |
Cross-posted to 2 groups.
Hello,
From the website http://www.tek-tips.com/viewthread.cfm?qid=1689945 I
got the following macro to extract hyperlinks embedded in a Word
document:
Function doHL()
Dim nd As Document
Dim a As Document
Dim h As Hyperlink
Dim r As Range
Application.ScreenUpdating = False
Set a = ActiveDocument
Set nd = Documents.Add
For Each h In a.Hyperlinks
Set r = nd.Range
r.Collapse
r.InsertParagraph
r.InsertAfter (h.Address)
Next
nd.Activate
Application.ScreenUpdating = True
Application.ScreenRefresh
End Function
The macro works like a charm, except that it lists the hyperlinks in
reverse order. Can someone kindly suggest a tweak to reverse (i.e.
correct) the order of hyperlinks in the document.
Thanks,
SS
Back to comp.sources.d | Previous | Next | Find similar
Word Macro to Extract Hyperlinks from a document sandeep6699@yahoo.com - 2013-04-25 17:11 -0700
csiph-web