WD2000: How to Use a Control Code to Search by Unicode Value

Article translations Article translations
Article ID: 211435 - View products that this article applies to.
This article was previously published under Q211435
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

Summary

In Microsoft Word 2000, you can use a search control code to search for a character by its Unicode value. The syntax of the control code is as follows:
   ^uNNNNN
				
where NNNNN is a decimal number corresponding to the Unicode character value.

More information

Microsoft provides programming examples 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. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals 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 needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

Microsoft Certified Partners - https://partner.microsoft.com/global/30000104

Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS The following Visual Basic for Applications macro will generate a list of the decimal equivalents for the Unicode character values. You can use these Unicode decimal values with the ^uNNNNN switch.
   Sub UnicodeGenerator()
      Dim I as Integer
      Documents.Add
      ' Set tab stops for clarity.
      Selection.ParagraphFormat.TabStops.ClearAll
      ActiveDocument.DefaultTabStop = InchesToPoints(0.5)
      Selection.ParagraphFormat.TabStops.Add Position:= _
      InchesToPoints(1.5), Alignment:=wdAlignTabCenter, _
      Leader:=wdTabLeaderDots
      ' Insert column headings.
      Selection.InsertAfter "Characters" & Chr(9) & "UniCode Values"
      Selection.InsertParagraphAfter
      ' Character values below 30 generate undesirable results
      ' when inserted into a document. For example, page breaks
      ' and column breaks.
      For i = 30 To 255
         ' Insert the character, a tab and the Unicode equivalent.
         Selection.InsertAfter Chr(i) & Chr(9) & AscW(Chr(i))
         Selection.InsertParagraphAfter
      Next
   End Sub
				
NOTE: To find a character using the Unicode value, click to select the Match Case check box. Word will search for either uppercase or lowercase characters depending on the value used in the search. If you clear the Match Case check box, Word will search all instances of uppercase and lowercase characters specified by the value.

For example, if the Match Case check box is cleared, ^u65 will find all uppercase "A" (Unicode value 65) and lowercase "a" (Unicode value 97) characters in a document.

References

For additional information about using Unicode in Microsoft Word 2000, click the article number below to view the article in the Microsoft Knowledge Base:
160070 WD97: Symbol Dialog Different from Previous Versions
212400 WD2000: General Information About International and Multilingual Features
217198 WD2000: What's New in Word 2000
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 211435 - Last Review: October 25, 2013 - Revision: 1.0
Applies to
  • Microsoft Word 2000
Keywords: 
kbnosurvey kbarchive kbhowto KB211435

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com