Find & Replace Out Tables

  • Thread starter Erica Mulkey via OfficeKB.com
  • Start date
E

Erica Mulkey via OfficeKB.com

Hello, I'm trying to figure out how to find & replace out entire tables if
they are preceded and followed by specific text. Say, preceded by "_before"
and followed by "_after", for example. I've tried using the wildcard F&R w/
[*] where the table fits in, to no avail.

(This table, in case it matters, contains 12 columns and two rows, the
bottom row being empty, and occurs many times in a mail-merged document;
this procedure once I have it figured out will be added to a macro that's
done on these merged docs.)

I've tried to learn the Visual Basic nomenclature for tables, but can't
find a central site to start learning that, and I'm hoping I don't need to
do that in order to accomplish this.

Thanks for any help, links, etc.
 
G

Greg Maxey

Erica,

Try

(_before)*(_after) in the find what

and

\1^13\2 in the replace with.

Make sure More>Use Wildcards is check.

Works here.
 
E

Erica Mulkey via OfficeKB.com

OK, that does work. Now I feel dumb because the only thing wrong with the
way I was doing it before was that I was giving the "*" its own range: [*].
I thought I was clear on what these [] were for in a wildcard search, but
apparently not. Thanks for your help!
 

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