Any way to delete all paragraphs with the same style in a Word file using VBA?

C

charity

Hi all,

I need to delete all paragraphs with the same style ( for example,
"TemplateNote". I know it's possible by using Style menu to selet all
instances and then delete them. But I need it be done using VBA. It's better
that your reply with some codes.

Thanks a lot.

Flybean
 
H

Howard Kaikow

There are a number of ways to do the deed in Word VBA.
One way is to use the Find method.

Check the Help in VBA for an example of how to use the Find method.
The examples should enable you to figure out how to solve the problem.
Steve Roman's book, Writing Word Macros, has a useful explanation of using
the Find method.

I list his, and other, books in the Word VBA booklist at my URL below.
 

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