Hi all,
I want to use just one module to format more than one text. How to do that?
For instance, I want to italicise the text "et al" and "apple". But i am stupid to use two modules to italicise them separately.
Below please find the code:
Code:
Sub formatting()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Italic = True
With Selection.Find
.Text = "et al"
.Forward = True
.Wrap = wdFindContinue
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Call Apple
End Sub
Sub Apple()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Italic = True
With Selection.Find
.Text = "Apple"
.Forward = True
.Wrap = wdFindContinue
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
May I ask how to use just one module to italicise the text "et al" and "apple"?
Thank you.