You are currently viewing the BOOK: Professional VSTO 2005 ISBN: 0-471-78813-9 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Each time I run the sample 4-2 it fails to find the word "documents".
When I run in debug, this line of code always fails.
Word.Range singleSent = par.Sentences[2];
The par.Sentences.count always = 1. Shouldn't it be 3?
Here's the sample text from the AllSamples.doc:
"The range object is probably the most popular object in the Word hierarchy of objects. The range object is responsible for defining a contiguous block of text on the documents surface. The range object is very flexible and allows for the addressing of several different range objects at a time."
Also, I can see that: text = "". Should this display the text of the sentence?