look up current word on the Web

P

Paul B

Hi. In Word '03 I'd like to be able to look up the current word
on my preferred dictionary, www.tfd.com.

So far I have

ActiveDocument.FollowHyperlink Address:="http://www.tfd.com"

which opens the site, but I need to select the current word and
add it to the url, so it becomes

ActiveDocument.FollowHyperlink _
Address:="http://www.tfd.com/currentword"

I think the way to do this is by setting up a variable and using
it to compose the url, but so far I haven't gotten anywhere.

Any help would be appreciated.
p.
 
P

Paul B

Hi. In Word '03 I'd like to be able to look up the current word
on my preferred dictionary, www.tfd.com.

So far I have

ActiveDocument.FollowHyperlink Address:="http://www.tfd.com"

which opens the site, but I need to select the current word and
add it to the url, so it becomes

ActiveDocument.FollowHyperlink _
Address:="http://www.tfd.com/currentword"

I think the way to do this is by setting up a variable and using
it to compose the url, but so far I haven't gotten anywhere.

Any help would be appreciated.
p.



Ok, so far I have

Set x = Selection.Range
ActiveDocument.FollowHyperlink _
Address:="http://www.tfd.com/" + x

Now if I can capture the current word as a selection or range I'm
in business.

p.
 
P

Paul B

Ok, so far I have

Set x = Selection.Range
ActiveDocument.FollowHyperlink _
Address:="http://www.tfd.com/" + x

Now if I can capture the current word as a selection or range I'm
in business.

p.


Looks like I've got it:

Selection.Words(1).Select
Set x = Selection.Range
ActiveDocument.FollowHyperlink _
Address:="http://www.tfd.com/" + x

Thanks for your help! ;)
p.
 

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