Detecting hidden text when it's hidden

B

Bear

When the formatting marks (and hidden text) are toggled off (not showing) in
a document, how can I determine whether or not the selection contains hidden
text? Or whether the paragraph before or after the selection is hidden?

I'm trying to put a frame around the selected paragraphs, anchored in the
following paragraph. But if a hidden paragraph precedes the selection, it
somehow always gets included in the framed material.

Similarly, if a hidden paragraphs follows the selection, the frame gets
anchored in the hidden paragraph. (I'm sure that will be a problem.)

I just need to detect hidden paragraphs and warn the user. But how?

Bear
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?QmVhcg==?=,
When the formatting marks (and hidden text) are toggled off (not showing) in
a document, how can I determine whether or not the selection contains hidden
text? Or whether the paragraph before or after the selection is hidden?

I'm trying to put a frame around the selected paragraphs, anchored in the
following paragraph. But if a hidden paragraph precedes the selection, it
somehow always gets included in the framed material.

Similarly, if a hidden paragraphs follows the selection, the frame gets
anchored in the hidden paragraph. (I'm sure that will be a problem.)

I just need to detect hidden paragraphs and warn the user. But how?
One possibility would be to use the TextRetrievalMode. For example, you could
query the range once with IncludeHiddenText set to True, and again with it set
to false. compare the two results. If they're different, there's likely hidden
text...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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