Hi Bob,
You'll only see the problem after you saved and reopened the file.
Hi JR,
Below's a macro to fix the text. It changes it to Arial. It'd be nicer to change it to the style's font, but that would require a much slower macro. You'd need to fix the font yourself as neccessary.
Regards,
Klaus
Sub FixTextAccidentallyUsingDecorativeFonts2()
' Should fix text that has been accidentally formatted
' in a decorative font, and change it to "Arial".
Dim myRange As Range
Dim myStoryRange As Range
For Each myStoryRange In ActiveDocument.StoryRanges
Set myRange = myStoryRange.Duplicate
Call FixText2(myRange)
MsgBox myStoryRange.Text, , myStoryRange.StoryType
While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
Set myRange = myStoryRange.Duplicate
Call FixText2(myRange)
MsgBox myStoryRange.Text, , myStoryRange.StoryType
Wend
Next myStoryRange
End Sub
Sub FixText2(myRangeOld As Range)
' myRange needed because a bug(?) in Word2003
' always takes me to footnote separator StoryRange?!?
Dim myRange As Range
Do
Set myRange = myRangeOld.Duplicate
With myRange.Find
.ClearFormatting
.Text = "[" & ChrW(&HF000) & "-" & ChrW(&HF0FF) & "]"
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
If .Execute Then
With myRange.Find
.Text = "^u" & Trim(str(AscW(myRange.Text) And &HFFFF&))
.Replacement.Text = ChrW(AscW(myRange.Text) - &HF000)
.Replacement.Font.Name = "Arial"
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = False
End With
myRange.Find.Execute Replace:=wdReplaceAll
Else
Exit Do
End If
End With
Loop
End Sub