Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find & Replace in Word ? stop 'Do you want to continue... "message 1

Status
Not open for further replies.

DrSimon

IS-IT--Management
Dec 14, 2001
674
GB
I have a Word macro that does a convert, find and replace for a table. No problem there. Annoyingly each replace ends with a msgbox asking if I want to continue searching. Is there any way of turning that msgbox off?
Simon Rouse
 
Any chance you could post your actual code ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
No problem. Not ashamed to admit that it was a recorded macro!

Many Thanks in anticipation.

Sub TableTidy()
'
' TableTidy Macro
' Macro recorded 08/02/06 by Simon Rouse
'
Selection.Rows.ConvertToText Separator:=wdSeparateByTabs, NestedTables:= _
True
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^t"
.Replacement.Text = "||"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
'Selection.Find.Find Replace
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "^p"
.Replacement.Text = "||^p||"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

 
Hi Simon,

You have Wrap set to Ask - so it does. Change it to wdFindContinue.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Thanks Tony, thought it would be easy but it didn't occur to me that Wrap had anything to do with it.
Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top