Using the wdFootnotesStory was something I also explored, but it didn't let me focus on individual footnotes. I'm trying to get fine grained control, and am removing the end spaces to learn how best to do that.
If a footnote ends in space(s) then I want to remove those spaces, hyperlink or not.
But the last space(s) might not be in a Hyperlink.TextToDisplay, so I do not want to trim spaces from all hyperlinks since their spaces may be separating words between Hyperlinks and non hyperlink text. (A footnote can have many hyperlinks within text)
But if the last space is not in a hyperlink, and by removing that space the end space may then become one at the end of a Hyperlink, and then it would need to be removed.
Same with paragraphs. A footnote could have multiple paragraphs but only the trailing space(s) at the end of the final one of the footnote should be removed.
|