Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-20-2014, 02:15 PM
Esgrimidor Esgrimidor is offline Add a word 2010 function to template Windows XP Add a word 2010 function to template Office XP
Advanced Beginner
Add a word 2010 function to template
 
Join Date: Jun 2009
Posts: 35
Esgrimidor is on a distinguished road
Default Add a word 2010 function to template

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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a word 2010 function to template Word 2010 form template not working steambc Word 7 08-28-2013 09:05 AM
Add a word 2010 function to template Normal Template in Word 2010 Castor Word 1 03-17-2013 04:27 PM
Add a word 2010 function to template Sub or Function not defined error - GetParaIndex Word 2010 jec1 Word VBA 1 05-24-2012 11:58 PM
Add a word 2010 function to template Word 2010 Startup with template screes 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft