Copy Paste Text with a hyperlink

  • Thread starter Philip L Jackson
  • Start date
P

Philip L Jackson

Hi

I have a customer with many 1000's of product descriptions in plain text
documents.

I have a small application whch can take these and copy/paste the text into
separate word documents. However the text includes various web addresses and
I wish to paste these into word as hyperlinks but cannot work out how to do
this.

Any advice greatfully appreciated.

Regards
PLJ
 
T

Tony Jollans

After copying and pasting, you can use AutoFormat (Format > Autoformat) to
do this. Just make sure the "Replace paths with hyperlinks" option is
checked and Word will find everything that looks like a web address and make
it a hyperlink.

Minimal VBA code for this is:

Options.AutoFormatReplaceHyperlinks = True
ActiveDocument.Range.AutoFormat
 
P

Philip L Jackson

Hi

Spot on - Thank you.

Regards

PLJ

Tony Jollans said:
After copying and pasting, you can use AutoFormat (Format > Autoformat) to
do this. Just make sure the "Replace paths with hyperlinks" option is
checked and Word will find everything that looks like a web address and make
it a hyperlink.

Minimal VBA code for this is:

Options.AutoFormatReplaceHyperlinks = True
ActiveDocument.Range.AutoFormat


--
Enjoy,
Tony

www.WordArticles.com
 

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