Underlining words like the speelc-hecker/smart tags

C

Cyril Mathey

Hello,

I am implementing a VSTO-based Word customization that must validate some
part of a document. When a given range is not valid, I would like to
underline it with a squiggle, just like how it is done by the spell checker,
or by the smart tag engine when it recognizes words. I want to retain the
style of the parts that are marked as invalid, so I am looking for a way to
do this without changing the underline and underline color properties.

Does anyone know if there is an alternate way to do this ?

Thanks a lot.
 
C

Cindy M -WordMVP-

Hi Cyril,
I am implementing a VSTO-based Word customization that must validate some
part of a document. When a given range is not valid, I would like to
underline it with a squiggle, just like how it is done by the spell checker,
or by the smart tag engine when it recognizes words. I want to retain the
style of the parts that are marked as invalid, so I am looking for a way to
do this without changing the underline and underline color properties.

Does anyone know if there is an alternate way to do this ?
There's nothing in the object model that will let you do this, I'm afraid. Here
are a couple of ideas:

- apply SHADING to the range in question. As the user is unlikely to be using
shading in text blocks, this shouldn't interfere with font formatting

- use the new form of Word 2003 protection. Lock the entire document body
against changes, then free up only the invalid ranges. The interface can
highlight the editable areas, only, and there's a button in the task pane to
move to next editable area.

- comment the invalid ranges

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