![]() |
#1
|
|||
|
|||
![]()
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 Best Regards |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
steambc | Word | 7 | 08-28-2013 09:05 AM |
![]() |
Castor | Word | 1 | 03-17-2013 04:27 PM |
![]() |
jec1 | Word VBA | 1 | 05-24-2012 11:58 PM |
![]() |
mark.osborne | Word | 3 | 08-19-2011 04:19 AM |
ActiveX controls inserted on a template do not function well | ged | Word | 0 | 10-21-2010 04:53 AM |