I tried to create a macro that inserts an empty space before and after italic text if it is surrounded by normal characters, like so:
- What it is supposed to look like: word1 word2 word3
- What it actually looks like: word1word2word3
So far, the best I could come up with only replaces the italicized text however.
With Selection.Find
.ClearFormatting
.Text = ""
.Replacement.ClearFormatting
.Replacement.Text = " "
.Font.Italic = True
.MatchWholeWord = False
While .Execute
.Execute Replace:=wdReplaceAll, Forward:=True, _
Wrap:=wdFindContinue
Wend
End With
End Sub
How should I approach solving this issue? Thank you in advance
