WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Hyperlink change after email...

 
   Home -> Office -> Links RSS
Next:  Date format not working for Excel 2007  
Author Message
Asif Shah

External


Since: Nov 10, 2005
Posts: 10



(Msg. 1) Posted: Wed Jul 16, 2008 6:34 am
Post subject: Hyperlink change after email...
Archived from groups: microsoft>public>excel>links (more info?)

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.
Back to top
Login to vote
Bill Manville

External


Since: Jul 30, 2004
Posts: 810



(Msg. 2) Posted: Wed Jul 16, 2008 11:29 pm
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Login to vote
Asif Shah

External


Since: Nov 10, 2005
Posts: 10



(Msg. 3) Posted: Wed Jul 16, 2008 11:29 pm
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks. But there was nothing in the Hyperlink base field. It was blank.

"Bill Manville" wrote:

> 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
>
>
Back to top
Login to vote
Bill Manville

External


Since: Jul 30, 2004
Posts: 810



(Msg. 4) Posted: Thu Jul 17, 2008 3:02 am
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Asif Shah wrote:
> 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
Back to top
Login to vote
Asif Shah

External


Since: Nov 10, 2005
Posts: 10



(Msg. 5) Posted: Thu Jul 17, 2008 6:00 am
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.

"Bill Manville" wrote:

> Asif Shah wrote:
> > 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
>
>
Back to top
Login to vote
Bill Manville

External


Since: Jul 30, 2004
Posts: 810



(Msg. 6) Posted: Thu Jul 17, 2008 2:53 pm
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Login to vote
Asif Shah

External


Since: Nov 10, 2005
Posts: 10



(Msg. 7) Posted: Thu Jul 17, 2008 2:53 pm
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.

"Bill Manville" wrote:

> 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
>
>
Back to top
Login to vote
Bill Manville

External


Since: Jul 30, 2004
Posts: 810



(Msg. 8) Posted: Thu Jul 17, 2008 11:38 pm
Post subject: Re: Hyperlink change after email... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Asif Shah wrote:
> 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
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Links All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET