D
Designingsally
Hi I got this huge doc(say abt 50 pages) I have this simple find and replace
macros to work on this doc. The macros are cool enough and working great. But
there are an issue that is highly bothering me.
When I have this huge doc (50 pages) i want to literally to see the change
happening in the document.what i mean is that i can see the change and within
a fraction of a second the macros are moving into the nextplace for finding.
The process is way to fast. cos sometimes the word might fit into the
context, while at some other time it does. So I want some kinda timer to be
set so as to see that word is being replaced and me having the time to read
and realise that it fits into the context or not.
I ll be glad if someone comes with a proper solution. I have no clue if this
can be achieved or not. If this cant be achieved pls suggest some other
alternative.
I ll paste a sample macro code below.
Dim orng As Range
Dim sRep As String
Dim sFindText As String
Dim sRepText As String
sFindText = "etc" 'the word to find
sRepText = "and so on" 'the word to replace
With Selection
..HomeKey wdStory
With .FInd
..ClearFormatting
..Replacement.ClearFormatting
..Wrap = wdFindContinue
..Format = False
..MatchCase = False
..MatchWholeWord = True
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
While .Execute(findText:=sFindText)
Set orng = Selection.Range
sRep = Msgbox("Replace?", vbYesNoCancel)
If sRep = vbCancel Then
Exit Sub
End If
If sRep = vbYes Then
orng.Text = sRepText
End If
Wend
macros to work on this doc. The macros are cool enough and working great. But
there are an issue that is highly bothering me.
When I have this huge doc (50 pages) i want to literally to see the change
happening in the document.what i mean is that i can see the change and within
a fraction of a second the macros are moving into the nextplace for finding.
The process is way to fast. cos sometimes the word might fit into the
context, while at some other time it does. So I want some kinda timer to be
set so as to see that word is being replaced and me having the time to read
and realise that it fits into the context or not.
I ll be glad if someone comes with a proper solution. I have no clue if this
can be achieved or not. If this cant be achieved pls suggest some other
alternative.
I ll paste a sample macro code below.
Dim orng As Range
Dim sRep As String
Dim sFindText As String
Dim sRepText As String
sFindText = "etc" 'the word to find
sRepText = "and so on" 'the word to replace
With Selection
..HomeKey wdStory
With .FInd
..ClearFormatting
..Replacement.ClearFormatting
..Wrap = wdFindContinue
..Format = False
..MatchCase = False
..MatchWholeWord = True
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
While .Execute(findText:=sFindText)
Set orng = Selection.Range
sRep = Msgbox("Replace?", vbYesNoCancel)
If sRep = vbCancel Then
Exit Sub
End If
If sRep = vbYes Then
orng.Text = sRepText
End If
Wend