Hi I have an old macro that needs to be converted to version 2012. Can anyone help me or is it going to be too complicated.
I copied it into a new macro but to no avail.
I would also like a smiley face button in excel to activate it.
Thanks in advance for any help.
Here it is:
Sub CleanUp()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-comffice:smarttags" /><st1:PersonName w:st="on">'</st1:PersonName><o></o>
<st1:PersonName w:st="on">'</st1:PersonName> CleanUp Macro<o></o>
<st1:PersonName w:st="on">'</st1:PersonName> Macro recorded 17/10/2005 by <st1:PersonName w:st="on">Charmaine Beckles</st1:PersonName><o></o>
<st1:PersonName w:st="on">'</st1:PersonName><o></o>
Selection.Find.ClearFormatting<o></o>
Selection.Find.Replacement.ClearFormatting<o></o>
With Selection.Find<o></o>
.Text = "'"<o></o>
.Replacement.Text = "<st1:PersonName w:st="on">'</st1:PersonName>"<o></o>
.Forward = True<o></o>
.Wrap = wdFindAsk<o></o>
.Format = False<o></o>
.MatchCase = False<o></o>
.MatchWholeWord = False<o></o>
.MatchWildcards = False<o></o>
.MatchSoundsLike = False<o></o>
.MatchAllWordForms = False<o></o>
<o> </o>
End With<o></o>
<o> </o>
Selection.Find.Execute Replace:=wdReplaceAll<o></o>
Selection.Find.ClearFormatting<o></o>
Selection.Find.Replacement.ClearFormatting<o></o>
With Selection.Find<o></o>
.Text = "&"<o></o>
.Replacement.Text = "&"<o></o>
.Forward = True<o></o>
.Wrap = wdFindAsk<o></o>
.Format = False<o></o>
.MatchCase = False<o></o>
.MatchWholeWord = False<o></o>
.MatchWildcards = False<o></o>
.MatchSoundsLike = False<o></o>
.MatchAllWordForms = False<o></o>
<o> </o>
End With<o></o>
<o> </o>
Selection.Find.Execute Replace:=wdReplaceAll<o></o>
Selection.Find.ClearFormatting<o></o>
Selection.Find.Replacement.ClearFormatting<o></o>
With Selection.Find<o></o>
.Text = """<o></o>
.Replacement.Text = "<st1:PersonName w:st="on">'</st1:PersonName>"<o></o>
.Forward = True<o></o>
.Wrap = wdFindAsk<o></o>
.Format = False<o></o>
.MatchCase = False<o></o>
.MatchWholeWord = False<o></o>
.MatchWildcards = False<o></o>
.MatchSoundsLike = False<o></o>
.MatchAllWordForms = False<o></o>
<o> </o>
End With<o></o>
<o> </o>
Selection.Find.Execute Replace:=wdReplaceAll<o></o>
<o></o>
<o> </o>
End Sub<o></o>
I copied it into a new macro but to no avail.
I would also like a smiley face button in excel to activate it.
Thanks in advance for any help.
Here it is:
Sub CleanUp()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-comffice:smarttags" /><st1:PersonName w:st="on">'</st1:PersonName><o></o>
<st1:PersonName w:st="on">'</st1:PersonName> CleanUp Macro<o></o>
<st1:PersonName w:st="on">'</st1:PersonName> Macro recorded 17/10/2005 by <st1:PersonName w:st="on">Charmaine Beckles</st1:PersonName><o></o>
<st1:PersonName w:st="on">'</st1:PersonName><o></o>
Selection.Find.ClearFormatting<o></o>
Selection.Find.Replacement.ClearFormatting<o></o>
With Selection.Find<o></o>
.Text = "'"<o></o>
.Replacement.Text = "<st1:PersonName w:st="on">'</st1:PersonName>"<o></o>
.Forward = True<o></o>
.Wrap = wdFindAsk<o></o>
.Format = False<o></o>
.MatchCase = False<o></o>
.MatchWholeWord = False<o></o>
.MatchWildcards = False<o></o>
.MatchSoundsLike = False<o></o>
.MatchAllWordForms = False<o></o>
<o> </o>
End With<o></o>
<o> </o>
Selection.Find.Execute Replace:=wdReplaceAll<o></o>
Selection.Find.ClearFormatting<o></o>
Selection.Find.Replacement.ClearFormatting<o></o>
With Selection.Find<o></o>
.Text = "&"<o></o>
.Replacement.Text = "&"<o></o>
.Forward = True<o></o>
.Wrap = wdFindAsk<o></o>
.Format = False<o></o>
.MatchCase = False<o></o>
.MatchWholeWord = False<o></o>
.MatchWildcards = False<o></o>
.MatchSoundsLike = False<o></o>
.MatchAllWordForms = False<o></o>
<o> </o>
End With<o></o>
<o> </o>
Selection.Find.Execute Replace:=wdReplaceAll<o></o>
Selection.Find.ClearFormatting<o></o>
Selection.Find.Replacement.ClearFormatting<o></o>
With Selection.Find<o></o>
.Text = """<o></o>
.Replacement.Text = "<st1:PersonName w:st="on">'</st1:PersonName>"<o></o>
.Forward = True<o></o>
.Wrap = wdFindAsk<o></o>
.Format = False<o></o>
.MatchCase = False<o></o>
.MatchWholeWord = False<o></o>
.MatchWildcards = False<o></o>
.MatchSoundsLike = False<o></o>
.MatchAllWordForms = False<o></o>
<o> </o>
End With<o></o>
<o> </o>
Selection.Find.Execute Replace:=wdReplaceAll<o></o>
<o></o>
<o> </o>
End Sub<o></o>