Inserting hyperlinked document

S

Shimon

Hello Forum,
I'm not sure this is the right place, but maybe somebody can help me or
direct me to the right place.
I have a word document that contains a hyperlink to another document. I
would like a macro or script that copies the document into the first
document (and replaces the hyperlink with the complete second document).
Thanks alot in advance,
Shimon
(e-mail address removed)
 
D

Dave Lett

Hi Shimon,

I think you can use something like the following:

Dim iLink As Integer
Dim oRngLink As Range

For iLink = ActiveDocument.Hyperlinks.Count To 1 Step -1
Set oRngLink = ActiveDocument.Hyperlinks(iLink).Range
oRngLink.InsertFile FileName:=oRngLink.Hyperlinks(1).Address
Next iLink


HTH,
Dave
 

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