ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Add a word 2010 function to template

(1/1)

Contro:
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: Visual Basic ---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....

Target:
pretty sure you should copy it into the normal.dotm...

Contro:
pretty sure you should copy it into the normal.dotm...
-Target (February 20, 2014, 05:56 PM)
--- End quote ---

But How ?. I have a headache trying to see how to save the script/macro/VBA file . :-[

Target:
open the VBA editor (SHIFT+F11) and copy to the NORMAL document.

if there's no module associated with NORMAL you can copy the module from the existing file, otherwise just copy and paste the code (then SAVE SAVE SAVE)

Contro:
open the VBA editor (SHIFT+F11) and copy to the NORMAL document.

if there's no module associated with NORMAL you can copy the module from the existing file, otherwise just copy and paste the code (then SAVE SAVE SAVE)
-Target (February 20, 2014, 08:22 PM)
--- End quote ---

Copy how ?. A step by step ? I am lost.
 :-[

Navigation

[0] Message Index

Go to full version