WD2000: Symbol Characters Change to Box Characters (212396)
The information in this article applies to:
This article was previously published under Q212396 For a Microsoft Word 2002 version of this article, see 290978.
SYMPTOMS
When you format text with a symbol font, such as Wingdings, and then change to a non-symbol font such as Times New Roman, the text is replaced with box characters.
CAUSE
Word displays the box characters after it translates the symbol font to its Unicode equivalent.
This problem occurs if the following steps are taken in the order listed:
- The text is formatted with a symbol font, such as Wingdings.
- The file is saved.
- The text is reformatted with a non-symbol font, such as Times New Roman.
WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
The following Microsoft Visual Basic for Applications macro converts the
symbol characters to non-symbol characters. NOTE: Before you run the following macro, select the square characters.
Sub ConvertSymbol()
Dim dlg As Object
Dim NoFC As Integer
Dim SCP As Integer
Dim StartRange As Range
Dim UniCodeNum As Integer
' Temporarily disable Screen Updating
Application.ScreenUpdating = False
' Temporarily disable Smart Cut & Paste
If Options.SmartCutPaste = True Then
SCP = 1
Options.SmartCutPaste = False
End If
' Temporarily display field text
If ActiveWindow.View.ShowFieldCodes = False Then
NoFC = 1
ActiveWindow.View.ShowFieldCodes = True
End If
' Set StartRange variable to current selection's range
Set StartRange = Selection.Range
Selection.Collapse
' Select first, then each next character in user-defined selection
Selection.MoveRight unit:=wdCharacter, Extend:=wdExtend
While Selection.End <= StartRange.End And _
ActiveDocument.Content.End > Selection.End
' If the character is a space, then move to next character
Set dlg = Dialogs(wdDialogInsertSymbol)
UniCodeNum = dlg.charnum
If UniCodeNum = 32 Then
Selection.Collapse
Selection.MoveRight unit:=wdCharacter, Extend:=wdMove
Selection.MoveRight unit:=wdCharacter, Extend:=wdExtend
End If
' Loop, converting symbol Unicode characters to ASCII characters
Set dlg = Dialogs(wdDialogInsertSymbol)
UniCodeNum = dlg.charnum
While UniCodeNum < 0 And Selection.End <= StartRange.End _
And ActiveDocument.Content.End > Selection.End
Selection.Delete
Selection.InsertAfter (ChrW(UniCodeNum + 4096))
Selection.Collapse (wdCollapseEnd)
Selection.MoveRight unit:=wdCharacter, Extend:=wdExtend
Set dlg = Dialogs(wdDialogInsertSymbol)
UniCodeNum = dlg.charnum
Wend
Selection.Collapse (wdCollapseEnd)
Selection.MoveRight unit:=wdCharacter, Extend:=wdExtend
Wend
' Reset Word document settings
If SCP = 1 Then Options.SmartCutPaste = True
If NoFC = 1 Then ActiveWindow.View.ShowFieldCodes = False
Selection.Collapse (wdCollapseStart)
Selection.MoveLeft unit:=wdCharacter
Application.ScreenUpdating = True
End Sub
NOTE: After you run the macro and the text is converted to non-symbol characters, you may need to format the text to the correct font.
Modification Type: | Major | Last Reviewed: | 6/17/2005 |
---|
Keywords: | kbdtacode kbpending kbprb KB212396 |
---|
|