pasting from web puts javascript in Hyperlink Editor "Address" fie

A

agg

I have many URLs I need to copy and paste from Web pages into Word. All the
Web pages I'm copying from have a javascript command to open the links in a
new window. When I straight copy and paste the text including the URL I need
into Word, the links don't work. Because... right clicking on the link to
view the Hyperlink Editor dialog box, shows that my paste results in the
URL's "Title on Link" being imported as the actual link which is fine, but
the "Address" is including the javascript AND the link:
javascript:eek:penWindow('www.linkhere.com'). Word is importing the behind the
scenes javascript into the Hyperlink editor! ugh.
I know I can paste these as straight text, then create the hyperlink, but
there are so many to do! Does anyone know of an automated way to strip this
javascript out of the link in the "Address" field of the Hyperlink editor? Or
any other workaround that's quick and easy? Thanks!
 
R

Robert M. Franz (RMF)

Hi agg
I have many URLs I need to copy and paste from Web pages into Word.

why/what for?

All the
Web pages I'm copying from have a javascript command to open the links in a
new window. When I straight copy and paste the text including the URL I need
into Word, the links don't work. Because... right clicking on the link to
view the Hyperlink Editor dialog box, shows that my paste results in the
URL's "Title on Link" being imported as the actual link which is fine, but
the "Address" is including the javascript AND the link:
javascript:eek:penWindow('www.linkhere.com'). Word is importing the behind the
scenes javascript into the Hyperlink editor! ugh.

You can't really find fault with it: the javascript is most probably
directly part of the HTML page you're copying from ... [and if all the
javascript does is open the link in a new window, then it's pretty
drastic a tool chosen by the webmaster ... :)]

I know I can paste these as straight text, then create the hyperlink, but
there are so many to do! Does anyone know of an automated way to strip this
javascript out of the link in the "Address" field of the Hyperlink editor? Or
any other workaround that's quick and easy? Thanks!

Can you give us the URL to such a page? You might be able to display
field codes and then use a clever Search/Replace run to strip out the
JAVASCRIPT. Have you tried to open such a webpage directly from Word
(File | Open, then enter/paste the URL)? Maybe you get a slightly
different code then.

2cents
Robert
 

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