How to find out if a style has been used in a given Section?

W

wordyOne

Hello,

I need to check to find out if a specific style, (e.g., "Heading 1"), is in
use in a given section of a document.

The catch is, I cannot use the Range.Find method to do this. This code is
running during Word's WindowSelectionChange event. And if the user happened
to double-click the Format Painter before moving the selection, the
Range.Find.Execute cancels out the FormatPainter mode.

Also, it is not practical for me to loop all paragraphs in the section to
check for the style, because it may be a very large document, and checking
each paragraph may cause an hourglass and visible delay when the user moves
the cursor around.

Does anyone know of a trick to get what I need under this scenario?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top