how can I convert text to hyperlink

G

Gordon

I get emails in OE from yahoo groups with links that are split into 3 or 4
lines and only part of the link is shown as hypertext (blue) the rest is just
black. Is there a way I can copy all of it to Word and convert the black part
to blue? I can copy the link to a Word doc, highlight and copy the black
under edit but the "paste as hyperlink" option is not available to me.
 
G

Graham Mayor

Without knowing exactly what we are dealing with we can only assume that the
mail reader has added hard returns at the end of each line. The only way to
deal with this would be to remove the hard returns from the lines and
autoformat to convert links to hyperlinks. You could automate that with a
macro. Select the broken link and run the following.

Sub ReLink()
Dim oRng As Range
Set oRng = Selection.Range
With oRng
.Text = Replace(.Text, Chr(13), "")
.Text = Replace(.Text, Chr(11), "")
With Options
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyBulletedLists = False
.AutoFormatApplyOtherParas = False
.AutoFormatReplaceQuotes = False
.AutoFormatReplaceSymbols = False
.AutoFormatReplaceOrdinals = False
.AutoFormatReplaceFractions = False
.AutoFormatReplacePlainTextEmphasis = False
.AutoFormatReplaceHyperlinks = True
.AutoFormatPreserveStyles = False
.AutoFormatPlainTextWordMail = False
End With
.AutoFormat
End With
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top