Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automatic select

25 views
Skip to first unread message

luc gregoire

unread,
Oct 8, 1997, 3:00:00 AM10/8/97
to

I have a question about word97.
I have a ascii text consisting of several records.
Within each record a portion of the text is enclosed
between brackets (<>)
What i want to do is automatically select all those
text portions between brackets and set them bold.
Is this possible with a macro?

Thanks for any help,
Luc.

WNCOAN

unread,
Oct 8, 1997, 3:00:00 AM10/8/97
to

>Within each record a portion of the text is enclosed
>between brackets (<>)
>What i want to do is automatically select all those
>text portions between brackets and set them bold.

You can use Word's Replace command to do this, if you don't mind having the
brackets themselves bolded along with the text between the brackets.

1. Click Replace on the Edit menu
2. Click MORE to display the full dialog box.
3. Check the USE WILDCARDS checkbox
4. In the Find What box, type (\<*\>)
5. In the Replace With box type \1
6. While the cursor is still in the Replace With box, click Format and select
Font, then click Bold and click OK.
7. Click Replace All

My undying gratitude to Wolfgang Hutter for showing me how to do this. I still
have a message from him taped to my monitor!

In case you care, here's what the Find What and Replace With strings mean:

Find What: (\<*\>)

Since you're using wildcards, the parentheses mean "This is an expression that
I want to retain when I do the replace."

\ means the next character is NOT a wild card, but just a character I'm looking
for. In this case, a less-than sign.
< means less than sign
* means find any string of characters
\ means the next character is NOT a wild card, but just a character I'm looking
for. In this case, a less-than sign.
> means greater than sign

\<*\> means look for a less than sign followed by any string of characters
followed by a greather than sign.

(\<*\>) means look for a less than sign followed by any string of characters
followed by a greather than sign AND SAVE THE EXPRESSION FOR RE-USE AFTER YOU
FIND IT.

Replace with: \1 bold

\1 means Insert the first expression that was found in the Find What box and
make it bold. In this case, there was only one expression that we were looking
for, so we replace the expression with itself and make the replacement bold.

Thanks Wolfie.
__
Bill Coan
Coan And Company, Inc.
Templates for training manuals and job aids.
http://www.ezmanual.com

0 new messages