I'm having issues when users create hyperlinks with trailing blanks. I can avoid this in some cases where the blanks are at the end of the line. I programatically remove the trailing blanks from the selected text parameter in the InsertHyperlink call. That works great. However, when the selected text is not at the end of the line, the characters of the link run together with the next word. So how can I determine if a trailing blank is at the end of a line?
Text line = "Now is the time "
If the user selects "time " and inserts a link there, the trailing blank is not included in the link. That is good.
However, if the user double-clicks "the", "the " is highlighted automatically. When a link is inserted, the resulting line looks like this:
"Now is the
time". So in this case, I don't want to trim the text I specify when I insert the link. How do I tell? The documentmodel is pretty complex.