Adding a file-based hyperlink with a relative path



I am trying to add a hyperlink to a file that is in the same folder as the excel file. With the following results:

Worksheet.Hyperlinks.Add(1,1,1,1,"test.pdf") - DOESN'T WORK

Worksheet.Hyperlinks.Add(1,1,1,1,".\test.pdf") - DOESN'T WORK

Worksheet.Hyperlinks.Add(1,1,1,1,"..\Images\test.pdf") - WORKS

Worksheet.Hyperlinks.Add(1,1,1,1,"C:\test\Images\test.pdf") - WORKS

As far as I can tell, it only works if the path contains either a drive spec (C:\) or a '..' This however doesn't help when the file is in the same folder as you either want to have no path or start '.\', neither of which work.

p.s. I have read the post: which has the same issue, and here you say to use '..', but I fail to see how this can be used to reference the current directory (instead it references the parent folder as would be expected).

Thanks for your help,



Thank you, Chris.

Yes, the first two cases don't work now. I will support them in a few days.



I just wondered if you have any update on when this fix will be available as it has been more than a few days?




Yes, it’s supported now. Please try this attached fix. A public release will be available within 1-2 days.