G
Gunter Schmidt
Hello,
I found this problem while programming a macro and isolated it:
- copy this macro to any document or normal
- make a new document, place some text into it
- run the macro: It should do its job like expected
- make another new document with some text
- run the macro again: the active document now will be changed to a
previous one!!!
Private Sub Test()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "a"
.Replacement.Text = "b"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll 'In Word 2003 the active
document will change!!! Bug.
End With
End Sub
Can you confirm this bug?
regards,
Gunter
I found this problem while programming a macro and isolated it:
- copy this macro to any document or normal
- make a new document, place some text into it
- run the macro: It should do its job like expected
- make another new document with some text
- run the macro again: the active document now will be changed to a
previous one!!!
Private Sub Test()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "a"
.Replacement.Text = "b"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll 'In Word 2003 the active
document will change!!! Bug.
End With
End Sub
Can you confirm this bug?
regards,
Gunter