Home |
Search |
Today's Posts |
#5
|
|||
|
|||
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 =3D myStoryRange.Duplicate Call FixText2(myRange) MsgBox myStoryRange.Text, , myStoryRange.StoryType While Not (myStoryRange.NextStoryRange Is Nothing) Set myStoryRange =3D myStoryRange.NextStoryRange Set myRange =3D 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 =3D myRangeOld.Duplicate With myRange.Find .ClearFormatting .Text =3D "[" & ChrW(&HF000) & "-" & ChrW(&HF0FF) & "]" .Forward =3D True .Wrap =3D wdFindContinue .MatchWildcards =3D True If .Execute Then With myRange.Find .Text =3D "^u" & Trim(str(AscW(myRange.Text) And &HFFFF&)) .Replacement.Text =3D ChrW(AscW(myRange.Text) - &HF000) .Replacement.Font.Name =3D "Arial" .Forward =3D True .Wrap =3D wdFindContinue .MatchWildcards =3D False End With myRange.Find.Execute Replace:=3DwdReplaceAll Else Exit Do End If End With Loop End Sub "JR" wrote =20 Thanks for the suggestion. When I transferred the text to=20 Notepad, it came out as gibberish - all squares. I have been able to=20 transfer to other symbol-based text fonts, just not Arial, Times NewRoman,=20 Palatino, etc. =20 "Opinicus" wrote: Interesting. Can you point me to a symbol-based font that I=20 can download on the internet? Wingdings is apparently not a=20 symbol-based font and I want to explore this problem. =20 --=20 Bob =20 Kanyak's Doghouse http://www.kanyak.com =20 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I restore "symbol" fonts for MS Office? | Microsoft Word Help | |||
Is there a way to type a division symbol using Word 2003 fonts? | Microsoft Word Help | |||
Insert Symbols: All of Them | Microsoft Word Help | |||
HOW TO CHANGE FONTS FROM DEVICE FONTS? | Microsoft Word Help | |||
How do i restore extra fonts to "Insert symbol"? | Microsoft Word Help |