I’m trying to use the document visitor object to parse a word document. Whenever I hit the Visitrun method I get unpredictable results. Sometimes it correctly returns the entire run of similarly formatted text. Other times, for example, I get one word, followed by a space and a word followed two words, etc.
run.Text = "The" (first run) run.Text = " quick" (second run) run.Text = " brown fox " (third run)
These runs are all one sentence and in the same font.
It seems to me this could be bug? It rather defeats the purpose of having ‘Runs’ if I still have to check the font properties of each run due to this behaviour.
Can you please shed some light on this problem? Thanks.