selectinve formating

  • Thread starter Thread starter Help me
  • Start date Start date
H

Help me

I have a document with 758 lines of questions and answers.

I want to format everything after the ? to the end of the line differently
with out having to do it manually for each line.

How can I do this ?
 
You can use the Wildcard option in the Replace function.
The code below will pick up the ? that is at the end of a sentence and
include all text up to the next paragraph mark.
Add this to the Find What box:
\?^13[+0-9A-z&./,)( –_-]{1,}\^13

In the Replace with box add ^& (this means keep the found text the same) and
click on the More button. Check the Wildcard box.
Now add the format you wish to change the answer entries to, this can
include the Answer Style that you may have created.

You must ensure there are no ?[space] which will not be selected. You could
run a find replace for [space]^13 with ^13 several times which will remove
any spaces before the paragraph marks.

As you will see the ? will also be formatted along with the Answer entries.
You can do a replace for ?^13 and replace the formatting back to what you
want.
This code I have converted from a code I use regularly use to find any
sentence that does not have a period, so hopefully it will work for you.

All the best
DeanH
 
Back
Top