Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Klaus Linke
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I restore "symbol" fonts for MS Office? Kim Microsoft Word Help 1 April 8th 05 07:41 PM
Is there a way to type a division symbol using Word 2003 fonts? Faithe Microsoft Word Help 3 March 18th 05 03:52 PM
Insert Symbols: All of Them Rebecca Microsoft Word Help 2 February 19th 05 08:34 PM
HOW TO CHANGE FONTS FROM DEVICE FONTS? font Microsoft Word Help 2 January 29th 05 04:53 PM
How do i restore extra fonts to "Insert symbol"? jpmccusa Microsoft Word Help 1 December 23rd 04 12:08 PM


All times are GMT +1. The time now is 09:01 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"