Someone a while back asked about a Word macro to convert text marked with underscores to italics. This code works for me:
Code:
Sub UnderscoresToItalics()
'
' UnderscoreToItalics Macro
' Macro recorded 11/14/2007 by Stephen Lins
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "_<*_"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.Replacement.Font.Italic = wdToggle
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "_"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub