How can I add this word function (macro) to the template exactly. I try with no results. I get functioning, but not to save to template for not copy/paste everytime I want to execute the function in a document to extract the hiperlinks.....
For word 2010
This is the code :
Code:
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
Save the function to the normal.dotm or corresponding to have for ever available....
Best Regards