You cannot locate characters that are associated with combining diacritic marks when you search in Word 2002 or in Word 2003 (886954)
The information in this article applies to:
- Microsoft Word 2002
- Microsoft Office Word 2003
Content Maintenance:25789 SYMPTOMSSuppose that you search a Microsoft Word 2002 document or a Microsoft Office Word 2003 document for a character string. To do this, you click Find on the Edit menu, or you use a Visual Basic for Applications macro. You may experience one or more of the following symptoms: - When you search for character, you do not find instances of that character that are associated with a combining diacritic mark, such as an accent mark.
- When you search for a combining diacritic mark, you do not find instances of that combining diacritic mark that are associated with a character.
Combining diacritic marks are Unicode characters that are used to modify other characters. A combining diacritic mark always follows the character that it modifies in a Word document. CAUSEIn a Word 2002 document or in a Word 2003 document, you can locate a character and its combining diacritic mark only when you search for the character together with its combining diacritic mark.WORKAROUNDTo work around this issue, use one or more of the following methods. Method 1: Locate all characters that are associated with combining diacritic marks- Open your Word document.
- On the Edit menu, click Find.
- Click More, and then click to select the Use wildcards check box.
- In the Find What box, type the following search string:
To type the ALT+768 and ALT+879 characters, press and hold the ALT key while you type the number by using the numeric keypad. For example, to type ALT+768, press and hold the ALT key while you type 768 by using the numeric keypad.
Note The question mark in this search string matches any character.
The left bracket and the right bracket specify a range of values. The numbers 768 to 879 are the decimal codes that correspond to the first and the last combining diacritic marks in Unicode, U+0300 to U+036f. When you press and hold ALT and type these decimal codes, you insert the corresponding combining diacritic mark. - Repeatedly
click Find Next to locate all the characters that are associated with combining diacritic marks.
Note You can use this method to find and to replace characters that are associated with combining diacritic marks.
Method 2: Locate a specific combination of a character and a combining diacritic mark- Open your Word document.
- On the Edit menu, click Find.
- Click More, and then click to clear the Use wildcards check box.
- In the Find What box, type the appropriate search string:
- If you know the Unicode hexadecimal value for the combining diacritic mark, type the character followed by the Unicode hexadecimal value for the combining diacritic mark, and then press ALT+X. For example, to search for the character "p" when it is associated with the combining diacritic mark that has a Unicode hexadecimal value of 301, type p301, and then press ALT+X.
- If you know the decimal code for the combining diacritic mark, type character^udecimalcode . For example, to search for the character p when it is associated with the combining diacritic mark that has a decimal code of 769, type p^u769.
-
Repeatedly click Find Next to locate all instances of the character and its combining diacritic mark.
Note You can use this method to find and to replace characters that are associated with combining diacritic marks.
Method 3: Run a Visual Basic for Applications macro in WordThe following Visual Basic for Applications macro locates all combinations of characters and combining diacritic marks. It replaces each combination with a string. The string is the text "HELLO." Microsoft 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.
For more information about how to create, to edit, and to run a Word macro, click Microsoft Office Word Help on the Help menu, type macro in the Search for box in the Assistance pane, and then click Start searching to view the topic.
'This Word macro replaces all combinations of a character
'and a combining diacritic mark for a selected part of
'a document. The replacement text is "HELLO."
Sub findcombined()
'Clear any formatting that is specified for a find operation.
'
Selection.Find.ClearFormatting
'Clear any formatting that is specified for a replace operation.
'
Selection.Find.Replacement.ClearFormatting
'Set up a Find and Replace operation.
'
With Selection.Find
'Set the Find What string to find all combinations of a character and
'a combining diacritic mark, where &ChrW represents a character and
'&H300 and &H36F represent the start and the end of the hexadecimal
'values that correspond to the range of combining diacritical marks
'in Unicode.
'
.Text = "?[" &ChrW(&H300) & "-" &ChrW(&H36F) & "]"
'Set the Replace with text to "HELLO."
'
.Replacement.Text = "HELLO"
'Set the search direction to search forward in the document.
'
.Forward = True
'Set the Find and Replace operation to wrap around to the start
'of the document when the end of the document is reached. This operation makes sure
'that the all the selected part of the document is searched.
'
.Wrap = wdFindContinue
'Clear any Format settings.
'
.Format = False
'Clear the Match case setting.
'
.MatchCase = False
'Clear the Find whole words only setting.
'
.MatchWholeWord = False
'Clear the Use wildcards setting.
'
.MatchWildcards = True
'Clear the Sounds like setting.
'
.MatchSoundsLike = False
'Clear the Find all word forms setting.'
.MatchAllWordForms = False
End With
'Execute the Find and Replace operation
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Modification Type: | Major | Last Reviewed: | 3/23/2006 |
---|
Keywords: | kbfindreplace kbtshoot kbprb KB886954 kbAudEndUser |
---|
|