Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Links / July 2008

Tip: Looking for answers? Try searching our database.

Hyperlink change after email...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Asif Shah - 16 Jul 2008 14:34 GMT
Hello.
I have an excel sheet that has hyperlinks to other sheets. All sheets are on
a network share and permissoins are open to all.

When I attach and email the excel sheet (that contains the hyperlinks) from
the network share, the recipient receives the sheet and opens it, the
hyperlinks have all been changed and now point to the recipients C drive
Documents and Settings instead of the network share, hence not being able to
open the hyperlink.

If I copy that sheet from the network share and paste it to my desktop and
then attach and email it, everything works great.

Any ideas??? I tried this on both Excel 2000 and 2003. Thanks.
Bill Manville - 16 Jul 2008 23:37 GMT
The hyperlinks are being stored as relative.
To get them stored as absolute, open the workbook in Excel (while it
still has its links to the correct network share),
File > Properties > Summary > Hyperlink base: \\NoServer\NoFolder
(or any other non-existent location).

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
Asif Shah - 17 Jul 2008 00:30 GMT
Thanks. But there was nothing in the Hyperlink base field. It was blank.

> The hyperlinks are being stored as relative.
> To get them stored as absolute, open the workbook in Excel (while it
[quoted text clipped - 5 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup
Bill Manville - 17 Jul 2008 07:24 GMT
> Thanks. But there was nothing in the Hyperlink base field. It was blank.

Exactly.
That's why you have the problem and why I suggested you fill it with some
non-existent location such as \\NoServer\NoFolder.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
Asif Shah - 17 Jul 2008 14:00 GMT
Oh OK.
I entered that in and now the link dosent even work from the network share
even before emailing. I get a message saying:

The address of this site is not valid. Check the address and try again.

> > Thanks. But there was nothing in the Hyperlink base field. It was blank.
> >
[quoted text clipped - 5 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup
Bill Manville - 17 Jul 2008 14:58 GMT
Whoops - sorry - yes.
What I should have said was "to avoid the problem you need to set an
impossible base before creating the hyperlinks".  That will cause the
hyperlinks to be created as absolute rather than relative.

Running the following macro should do the trick of converting the
relative links to absolute:

Sub FixHyperLinks()
 Dim WS As Worksheet
 Dim H As Hyperlink
 ActiveWorkbook.BuiltinDocumentProperties("Hyperlink Base") = _
            "\\NoServer\NoFolder"
 For Each WS In ActiveWorkbook.Worksheets
   For Each H In WS.Hyperlinks
     If Mid(H.Address, 2, 1) <> ":" And _
              Left(H.Address, 2) <> "\\" Then
       H.Address = ActiveWorkbook.Path & "\" & H.Address
     End If
   Next
 Next
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
Asif Shah - 17 Jul 2008 19:47 GMT
I added the hyperlink base first and then created the hyperlinks in the sheet
and that worked. But this is something we have to do each time. This never
used to happen before.
Will the macro take care of it permanantly? Where do I enter it in?
Thanks.

> Whoops - sorry - yes.
> What I should have said was "to avoid the problem you need to set an
[quoted text clipped - 22 lines]
> MVP - Microsoft Excel, Oxford, England
> No email replies please - respond to newsgroup
Bill Manville - 17 Jul 2008 23:43 GMT
> Will the macro take care of it permanantly?
Yes

> Where do I enter it in?

In the VB editor, in a standard module

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.