The macro recorder will not record formatting, but you can use something
similar to the following
The macro uses 2 arrays for the find and replacement texts. Each array here
has four entries in quotes separated by commas.
The superscripted item in the first array is replaced by the
mon-superscripted corresponding item in the second array
Sub ReplaceExample()
Dim vFindText As Variant
Dim vReplText As Variant
Dim i As Long
vFindText = Array("(1)", "(2)", "(3)", "(4)")
vReplText = Array("(Jones, 2008)", "(Smith, 2007)", "(Bloggs, 2005)",
"(Jones, 2009)")
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
'**********************
.Font.Superscript = True
.Replacement.Font.Superscript = False
'**********************
.Forward = True
.Wrap = wdFindContinue
.format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
For i = LBound(vFindText) To UBound(vFindText)
.Text = vFindText(i)
.Replacement.Text = vReplText(i)
.Execute Replace:=wdReplaceAll
Next i
End With
End With
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>