Unless you're proposing the change the Style of the whole paragraph, you will have trouble with having Word identify a sentence. That's because VBA has no idea what a grammatical sentence is. For example, consider the following:
Mr. Smith spent $1,234.56 at Dr. John's Grocery Store, to buy: 10.25kg of potatoes; 10kg of avocados; and 15.1kg of Mrs. Green's Mt. Pleasant macadamia nuts.
For you and me, that would count as one sentence; for VBA it counts as 5 sentences.
If you're trying to change the Style of the whole paragraph, you can use a wildcard Find/Replace where, for example:
Find = State Community Name:*^13
Replace = ^&
And you set the Replacement Style to Heading1. No macros required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|