UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Hyperlink In Word, Office 2010    
 
   
Ciflern
post Jun 6 2017, 04:08 AM
Post#1



Posts: 1
Joined: 6-June 17



HELLO,

I get a word document which contains quite a few links. But these links are all text format , not the hyperlinks. I want to change them all into hyperlink. Do I have to insert the hyperlink for them one by one? Any way to batch do this? Thanks.
Go to the top of the page
 
doctor9
post Jun 6 2017, 09:39 AM
Post#2


Remembered
Posts: 18,324
Joined: 29-March 05
From: Wisconsin


Ciflern,

welcome2UA.gif

Just to clarify: do you mean that you receive a Word file that contains text like this:

www.google.com
www.yahoo.com

And you want to change it to this:

www.google.com
www.yahoo.com

Is this right?

Dennis
Go to the top of the page
 
ADezii
post Jun 6 2017, 06:43 PM
Post#3



Posts: 2,114
Joined: 4-February 07
From: USA, Florida, Delray Beach


Here is a Sample Macro, but the Links must be known ahead of time. The Links, as Text, will be converted to HyperLinks.
CODE
Sub InsertLinks()
Dim rng As Range
Dim intCtr As Integer
Dim astrString(1 To 3) As String

astrString(1) = "http://www.Comcast.net"
astrString(2) = "http://www.msn.com"
astrString(3) = "http://www.aol.com"

For intCtr = LBound(astrString) To UBound(astrString)
  Set rng = ActiveDocument.Range
    With rng.Find
      .MatchWildcards = True
      .Execute FindText:=astrString(intCtr), Forward:=True
        rng.Select
       ActiveDocument.Hyperlinks.Add Anchor:=rng, _
       Address:=rng.Text, SubAddress:="", ScreenTip:="", TextToDisplay:=rng.Text
    End With
Next
End Sub
Go to the top of the page
 
doctor9
post Jun 12 2017, 10:16 AM
Post#4


Remembered
Posts: 18,324
Joined: 29-March 05
From: Wisconsin


Ciflern,

It would help a great deal if you contributed to the conversation. Was my description of your problem accurate?

Dennis
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th October 2018 - 02:08 PM