top urgent:show hyperlink pathes

R

Ramadan

my excel sheet is a huge one and I have a column that has
a disply of the hyperlink of all the cells I mean any cell
linked with a path by hyperlink to the ceartain folder
as this \\servername\sharename\directory1\directory1
\filename.pdf
now what hapen is that the repeating of directory1
was happend and now all the links to files are not correct
as tha previous one .
the correct path is \\servername\sharename\directory1
\filename.pdf
now is there any way to delete the folder directory1 from
the path to all the cells which are a bignomber without
editing evreyone each .
second is there any way to make a new column that has the
hyperlinks pathes then to make replacement with find for
any word?
thanks alot for help.
 
T

Tom Ogilvy

Dim hlink as Hyperlink
for each hlink in Activesheet.hyperlinks
if instr(hlink.Address, "\directory1\directory1") then
hlink.Address = Application.Substitute( _
hlink.Address,"\directory1\directory1", "\directory1")
end if
Next
 

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