Use the \\?\ UNC prefix to break out of "DOS mode" for paths. If it is the UNC: How do I get the UNC of the linked file at runtime in order to count its characters?.But maybe that is because of the backslashes?) Which length determines the maximum length of a hyperlink? Is it really the UNC? Or is it another value? (I’m kind of skeptical because the “ok-UNC” is 258 characters long, not 256.Now I plan to check the hyperlink length before setting the link, in order to avoid later difficulties. I also noticed that the 259 character-hyperlinks do work when the text to display is the same as the address. One character longer, and the PDF does not open (no error message, IE just does not react). When I’m opening a PDF with this UNC through IE, it works fine as long as its length is Word 2016: “Cannot locate the Internet server or proxy server.”.Word 20: “An unexpected error has occurred.”.One character longer, and I’m getting following errors when following the link: Hyperlinks up to 258 characters long (UNC length) work both in Word as well as in IE.
So I assume that is the determining length to be considered. On mouse over, the StatusBar does not show the relative, but the absolute hyperlink, and in UNC, not the mapped drive. The hyperlink address set in Doc1.docx is "FolderB\LinkedFile.pdf".C:\FolderA\FolderB contains LinkedFile.pdf.My code, an Application Add-In, is setting relative hyperlinks (to PDF files) in Word files.