find and replace groups of words with formatting

T

Travis

Hi,
I have a large body of text that I've scanned into Word. In the
original, there are sections that are in the format [group of words],
with the sections in square brackets being in italics. Is there a way
to do a find and replace where everything that appears between the
square brackets becomes italic?

Thanks
 
D

Daiya Mitchell

Scanned into Word? I assume it has been OCR'ed and is actually text
that Word will be able to find.

What you need is a wildcard search. See the Help topic "Advanced search
methods". Experiment ON A COPY.

I experimented, as I'm not good at wildcards, and this kludge was the
best I could come up with:

Step 1) Put \[*\] into the Find box. Click the blue triangle to expand
the dialog, and check "use wildcards". Put the cursor in the Replace box
and use the Format Font menu in the dialog to format the empty replace
box as italic. Replace All. This should format the phrase between the
brackets AND the brackets. I only tested on single words, though, so
experiment ON A COPY.

Step 2) Put [ into the Find box. Uncheck use wildcards. Cursor in the
Replace box, and set the Format to be Not Italic (which will magically
appear in the menu in the dialog box). This will undo the italicizing
of the bracket. Repeat for [ .

Or perhaps someone will come along with a better idea.
 
T

Travis

Hi Daiya,

Well done! That works perfectly! When I looked at the wildcard
instructions in the help menu, I was thrown because it shows square
brackets as a wild card symbol, so my own attempts to figure it out
weren't getting me anywhere.

Thanks! And doubly for the speedy response!

Travis
 

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