RTF Hyperlinks with Quotes
Posted: Thu Nov 10, 2005 10:05 pm
Hi Sergey,
I seem to have made a stunning discovery : Word 97 (and Win2k's WordPad) don't like RTF Hyperlinks with quotes.
Basically, if OnWriteHyperlink() event handler sets Target to:
filename -> all is well
"filename" -> WordPad displays <>, Word 97 displays "Error! Hyperlink reference not valid"
""filename"" -> Same
file"name -> Both Word and WordPad display "file" as the target (cut-off at the quote)
I can of course simply ensure filenames are not enclosed in quotes when exporting RTF or copying to the Clipboard, but I was wondering if you know about this issue and if there's some "correct" way to encode quotes. What if the link is not to a file but some arbitrary text that may contain embedded quotes? Not likely to happen, but still.
Thanks,
Michel
I seem to have made a stunning discovery : Word 97 (and Win2k's WordPad) don't like RTF Hyperlinks with quotes.
Basically, if OnWriteHyperlink() event handler sets Target to:
filename -> all is well
"filename" -> WordPad displays <>, Word 97 displays "Error! Hyperlink reference not valid"
""filename"" -> Same
file"name -> Both Word and WordPad display "file" as the target (cut-off at the quote)
I can of course simply ensure filenames are not enclosed in quotes when exporting RTF or copying to the Clipboard, but I was wondering if you know about this issue and if there's some "correct" way to encode quotes. What if the link is not to a file but some arbitrary text that may contain embedded quotes? Not likely to happen, but still.
Thanks,
Michel