changing url into hyperlink

L

Larry

How do you programmatically turn a url into a hyperlink pointed to that
url?

Thanks,
Larry
 
J

Jay Freedman

Larry said:
How do you programmatically turn a url into a hyperlink pointed to
that url?

Thanks,
Larry

This would be the minimum, assuming that the url is selected (and nothing
else):

ActiveDocument.Hyperlinks.Add _
Anchor:=Selection.Range, _
Address:=Selection.Text

You might want to do some error-checking. ;-)
 
L

Larry

Thanks much. I should have been able to figure this out, from previous
macros I have that work with hyperlinks, but it's been a while and it
wasn't fresh to my memory. The newsgroups remain invaluable.

Larry
 

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