Word VBA

P

Peter

Ok this one is killing me.
I'm trying to use the range object to select all paragraph marks in a
document.
Then ensure all paragraph marks have no bold or italic settings.
So I'm doing this (see below)...but I can't get it to select all it only
selects the first one found.
I know there is a way of doing this, but I'm struggling to recall.
Any help gratefully received!

Regards,

Peter

Set rngSearch = ActiveDocument.Content
With rngSearch.Find
.Text = "^p"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
rngSearch.Find.Execute
rngSearch.Select
 

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