trying to automate a correction

K

KarenRC

Hi All,

I've been given 7 Word files that contain about 320 pages of address labels
(formatted as Avery 5162). Unfortunately, a flaw in the database that
generated the files failed to insert a space in the postal code (eg L7P3C6
instead of L7P 3C6). Is there any way to have the program insert a space in
all 4400+ cells? It would be in the same position in every cell (three
characters in from the end).
Any advice is greatly appreciated.

Regards,
Karen in Keswick
 
S

Suzanne S. Barnhill

Assuming that the format of the postal code is consistent
(letter-digit-letter-digit-letter-digit), it should be possible to do this
using wildcards:

1. Press Ctrl+H to open the Find and Replace dialog.

2. Click More to expand the dialog.

3. Check the box for "Use wildcards."

4. In the "Find what" box, type:

([A-Z][0-9][A-Z])([0-9][A-Z][0-9])

5. In the "Replace with" box, type:

\1 \2

The search string [A-Z] will find any single capital letter. [0-9] will find
any digit. The parentheses group these characters into two groups, which can
then be reproduced using the \1 and \2 with a space between them.

For more on using wildcards, see
http://word.mvps.org/FAQs/General/UsingWildcards.htm
 
K

KarenRC

Worked like a charm...thank you!

Karen :eek:)
--


Suzanne S. Barnhill said:
Assuming that the format of the postal code is consistent
(letter-digit-letter-digit-letter-digit), it should be possible to do this
using wildcards:

1. Press Ctrl+H to open the Find and Replace dialog.

2. Click More to expand the dialog.

3. Check the box for "Use wildcards."

4. In the "Find what" box, type:

([A-Z][0-9][A-Z])([0-9][A-Z][0-9])

5. In the "Replace with" box, type:

\1 \2

The search string [A-Z] will find any single capital letter. [0-9] will find
any digit. The parentheses group these characters into two groups, which can
then be reproduced using the \1 and \2 with a space between them.

For more on using wildcards, see
http://word.mvps.org/FAQs/General/UsingWildcards.htm



KarenRC said:
Hi All,

I've been given 7 Word files that contain about 320 pages of address labels
(formatted as Avery 5162). Unfortunately, a flaw in the database that
generated the files failed to insert a space in the postal code (eg L7P3C6
instead of L7P 3C6). Is there any way to have the program insert a space in
all 4400+ cells? It would be in the same position in every cell (three
characters in from the end).
Any advice is greatly appreciated.

Regards,
Karen in Keswick
 

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