View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Hyperlinks getting changed on save

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



"Dennis Benjamin" wrote in message
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!