Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mmekennedy
 
Posts: n/a
Default global change to document hyperlink root directory

Ii have an excel file that was corrupted and restored and now that i placed
it back in the original folder 100's of links are wrong and point to restored
folder ... is there a way to get the links to point to the correct path vs
the restore path?
  #2   Report Post  
Bill Manville
 
Posts: n/a
Default

Mmekennedy wrote:
Ii have an excel file that was corrupted and restored and now that i placed
it back in the original folder 100's of links are wrong and point to restored
folder ... is there a way to get the links to point to the correct path vs
the restore path?


If you have links to a few files, Edit / Links / Change Source
If you have links to 100s of files, you could try my LinkManager.
(It is designed to change links in many files, but could probably be persuaded
to do just the one).

If Edit / Links is too daunting, email me at Bill_Manville @ compuserve.com
(without the spaces) for a copy of LinkManager

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

  #3   Report Post  
mmekennedy
 
Posts: n/a
Default

These are hyperlinks (file pointers to documents in a folder on the network)
- edit - link does not work in this instance - any other ideas\suggestions?

"Bill Manville" wrote:

Mmekennedy wrote:
Ii have an excel file that was corrupted and restored and now that i placed
it back in the original folder 100's of links are wrong and point to restored
folder ... is there a way to get the links to point to the correct path vs
the restore path?


If you have links to a few files, Edit / Links / Change Source
If you have links to 100s of files, you could try my LinkManager.
(It is designed to change links in many files, but could probably be persuaded
to do just the one).

If Edit / Links is too daunting, email me at Bill_Manville @ compuserve.com
(without the spaces) for a copy of LinkManager

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup


  #4   Report Post  
JulieD
 
Posts: n/a
Default

Hi

i've recently written a macro to deal with a workbook with 300+ hyperlinks
when the IT dept renamed the folders on the server (sweet people) ... if
you'ld like to give me an example of the wrong address and the right address
i might be able to modify it to work for you.

Cheers
JulieD

"mmekennedy" wrote in message
...
These are hyperlinks (file pointers to documents in a folder on the
network)
- edit - link does not work in this instance - any other
ideas\suggestions?

"Bill Manville" wrote:

Mmekennedy wrote:
Ii have an excel file that was corrupted and restored and now that i
placed
it back in the original folder 100's of links are wrong and point to
restored
folder ... is there a way to get the links to point to the correct
path vs
the restore path?


If you have links to a few files, Edit / Links / Change Source
If you have links to 100s of files, you could try my LinkManager.
(It is designed to change links in many files, but could probably be
persuaded
to do just the one).

If Edit / Links is too daunting, email me at Bill_Manville @
compuserve.com
(without the spaces) for a copy of LinkManager

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup




  #5   Report Post  
Bill Manville
 
Posts: n/a
Default

Sorry - I failed to read the title of your post - obviously you were
talking about hyperlinks.

LinkManager will be able to change hyperlinks for you.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup



  #7   Report Post  
JulieD
 
Posts: n/a
Default

Hi

here's the code
---------
Sub updatehlinks()
Dim fname As String
Dim pname As String
Dim dval
Dim i As Long
Dim j As Long
fname = "*.xls" 'filename
pname = "C:\temp\excel" 'folder to use
Application.ScreenUpdating = False
With Application.FileSearch
.NewSearch
.LookIn = pname
.SearchSubFolders = False
.Filename = fname 'check to see if any files match the fname
If .Execute() 0 Then
For i = 1 To .FoundFiles.Count
Workbooks.Open .FoundFiles(i)
'step through the sheets updating the hyperlinks
fname = ActiveWorkbook.Name
For j = 1 To Sheets.Count
Sheets(j).Activate
For Each hlnk In ActiveSheet.Hyperlinks
hlnk.Address =
Application.WorksheetFunction.Substitute(hlnk.Addr ess, "group", "groups", 1)
Next
Next
Workbooks(fname).Save
Workbooks(fname).Close
Next
End If
End With
Application.ScreenUpdating = True
End Sub
-------
it's designed to cycle through all the workbooks in a folder, looking for
the hyperlinks and changing a name of the folder in the path from "group" to
"groups" (don't you just love IT people!)

hope it helps
Cheers
JulieD

"mmekennedy" wrote in message
...
Julie D

It varies from worksheet to worksheet .. but if you could sendme the root
macro I would be able to modfiy it accordingly - please advise

is my email

"JulieD" wrote:

Hi

i've recently written a macro to deal with a workbook with 300+
hyperlinks
when the IT dept renamed the folders on the server (sweet people) ... if
you'ld like to give me an example of the wrong address and the right
address
i might be able to modify it to work for you.

Cheers
JulieD

"mmekennedy" wrote in message
...
These are hyperlinks (file pointers to documents in a folder on the
network)
- edit - link does not work in this instance - any other
ideas\suggestions?

"Bill Manville" wrote:

Mmekennedy wrote:
Ii have an excel file that was corrupted and restored and now that i
placed
it back in the original folder 100's of links are wrong and point to
restored
folder ... is there a way to get the links to point to the correct
path vs
the restore path?


If you have links to a few files, Edit / Links / Change Source
If you have links to 100s of files, you could try my LinkManager.
(It is designed to change links in many files, but could probably be
persuaded
to do just the one).

If Edit / Links is too daunting, email me at Bill_Manville @
compuserve.com
(without the spaces) for a copy of LinkManager

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to do global replace in hyperlinks for entire excel document? AKennedy Excel Discussion (Misc queries) 2 March 19th 05 04:27 PM
change directory for refresh data TxRaistlin Excel Discussion (Misc queries) 0 February 7th 05 09:09 PM
How to embed Word document into Excel and retain sizing, formatti. Kent Excel Discussion (Misc queries) 0 February 2nd 05 07:37 PM
Hyperlink to a word document JS Excel Discussion (Misc queries) 1 December 10th 04 10:49 PM
Hyperlink to word document problem JS Links and Linking in Excel 0 December 8th 04 10:54 PM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"