Hello. I created the macro below in Word 2010. My OS is Windows 7 Professional. The macro is located in “normal.dotm”. I assigned the keyboard shortcut “Alt-Z” to the macro. When I type Alt-Z, nothing seems to happen. The macro is supposed to find (all instances of 1 or more spaces using wildcards), and replace (each instance with exactly 1 space).
After I type Alt-Z, nothing seems to happen. Then, if I type Ctl-H, the Search And Replace dialog box opens, and I see that the Find and Replace fields are populated by the text shown in the macro. And if I click on “Replace All”, each instance of found text is replaced as I describe above.
Some help please?
[Start Of Macro]
Sub F_GTE_1sp_R_1sp()
‘
‘ F_GTE_1sp_R_1sp Macro
‘
‘
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = “([.:])( @)([! ])”
.Replacement.Text = “\1 \3”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
End Sub
[End Of Macro]