Hyperlinks getting changed on save

  • Thread starter Thread starter Dennis Benjamin
  • Start date Start date
D

Dennis Benjamin

Hi All

I'm having some difficulty with hyperlinks in Excel. I have a VBA script
which generates new cells in a document, each cell is hyperlinked to a
document stored in a diff directory. The code generates an absolute path to
the linked document. It all works fine, except that the next time the
spreadsheet is saved _all_ the hyperlinks in the sheet are changed to a
relative pathname, one that is no longer valid. I can suppress this annoying
behavior by navigating to Tools->Options->General->Web options->Files and
deselecting "Update Links on save". However, many people open and save this
document.

So, does anyone know how can I keep Excel from destroying the hyperlinks I
create in my script?

Thanks!
 
Dennis,
Some things you can try...
1. If it is an new unsaved workbook that you are using,
try saving the workbook before inserting the hyperlinks.
2. Application.DefaultWebOptions.UpdateLinksOnSave = False
3. Insert the file path in File | Properties | Summary (tab) | Hyperlink base

Regards,
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



Hi All
I'm having some difficulty with hyperlinks in Excel. I have a VBA script
which generates new cells in a document, each cell is hyperlinked to a
document stored in a diff directory. The code generates an absolute path to
the linked document. It all works fine, except that the next time the
spreadsheet is saved _all_ the hyperlinks in the sheet are changed to a
relative pathname, one that is no longer valid. I can suppress this annoying
behavior by navigating to Tools->Options->General->Web options->Files and
deselecting "Update Links on save". However, many people open and save this
document.
So, does anyone know how can I keep Excel from destroying the hyperlinks I
create in my script?
Thanks!
 

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

Back
Top