WD97: Symbol Characters Change to Box Characters

Last reviewed: February 5, 1998
Article ID: Q160022
The information in this article applies to:
  • Microsoft Word 97 for Windows

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 when you do the following:

  1. Format text using a symbol font, such as Wingdings.

  2. Select the text from Step 1 and apply a non-symbol font, such as Times New Roman.

WORKAROUND

Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.

The following Microsoft Visual Basic for Applications macro converts the symbol characters to non-symbol characters:

NOTE: Select the square characters before you run the following macro.

   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


MORE INFORMATION

The following table lists common symbol and non-symbol fonts.

 Symbol Fonts                             Non-Symbol Fonts
 ---------------------------------------------------------

 Bookshelf Symbol 3                       Arial
 Marlett                                  Book Antiqua
 Monotype Sorts                           Bookman Old Style
 MS Outlook                               Century Schoolbook
 MT Extra                                 Courier New
 Symbol                                   Garamond
 Wingdings                                Times New Roman

Unicode

Unicode is a 16-bit character set designed to cover all the world's major living languages, in addition to scientific symbols and dead languages that are the subject of scholarly interest. It eliminates the complexity of multi-byte character sets that are currently used on UNIX and Windows to support Asian languages. A consortium of companies including Apple, Microsoft, Hewlett-Packard (HP), Digital, and IBM created Unicode. These companies used information from the ISO-10646 standard to produce a single standard in 1993. Unicode is the basis for the Windows NT operating system.

Unicode is a 16-bit character set where all characters occupy the same space. The first 256 values are the same as the ISO-Latin character set, which is also the basis for the ANSI character set used in Windows 3.1 and Windows 95. However, Unicode defines 34,168 distinct coded characters. In most character sets a single value is often assigned to several characters. For example, in ASCII a "-" is used to represent a hyphen, a minus sign, a dash, and a non-breaking hyphen. In Unicode, each meaning is given its own code; that is, a hyphen is represented by a character different from a minus sign, and so forth. The Unicode standard contains only one instance of each character and assigns it a unique name and code value. It also supports "combining" accent characters, which follow the base character that they are to modify.

For more information on Unicode, visit the Unicode Web site at:

   http://www.unicode.org/


Additional query words: square boxed garbage incorrect font symbols change
changed changing
Version : 97
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.