HenkMartinus
Gebruiker
- Lid geworden
- 25 apr 2007
- Berichten
- 36
Ik heb een macro gemaakt die het woordje "Zoo" vervangt door "Zo" zie hieronder:
met deze macro wordt echter ook het woordje Zoon gewijzigd in Zon,
daarom zou ik de constructie zo willen aanpassen dat het met uitzondering van Zoon of zoon is.
Hoe moet ik dat doen?
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Zoo"
.Replacement.Text = "Zo"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True 'true ivm hoofd letters
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
met deze macro wordt echter ook het woordje Zoon gewijzigd in Zon,
daarom zou ik de constructie zo willen aanpassen dat het met uitzondering van Zoon of zoon is.
Hoe moet ik dat doen?
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Zoo"
.Replacement.Text = "Zo"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True 'true ivm hoofd letters
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll