Macro

D

David G. Smith

I would like to loop this macro to the end of my
Document. How would I do it? If you know how I can do it
please send me a E-Mail because I am not sure I can find
my way back here.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/23/2004 by David G. Smith
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "1 NOTE REFN: ^#^#^#^#"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
End Sub
 
C

Cindy M -WordMVP-

Hi David,
I would like to loop this macro to the end of my
Document. How would I do it? If you know how I can do it
please send me a E-Mail because I am not sure I can find
my way back here.
I won't send you an email, but if you can find your way
back here...

You'll find sample code for this on the word.mvps.org
website. Basically, you just test until .Found or .Execute
return false.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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