You cannot locate characters that are associated with combining diacritic marks when you search in Word 2002 or in Word 2003

Article translations Article translations
Article ID: 886954 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Suppose 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.

CAUSE

In 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.

WORKAROUND

To work around this issue, use one or more of the following methods.

Method 1: Locate all characters that are associated with combining diacritic marks

  1. Open your Word document.
  2. On the Edit menu, click Find.
  3. Click More, and then click to select the Use wildcards check box.
  4. In the Find What box, type the following search string:
    ?[ALT+768-ALT+879]
    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.
  5. 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

  1. Open your Word document.
  2. On the Edit menu, click Find.
  3. Click More, and then click to clear the Use wildcards check box.
  4. 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.
  5. 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 Word

The 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

Properties

Article ID: 886954 - Last Review: March 23, 2006 - Revision: 4.2
APPLIES TO
  • Microsoft Word 2002 Standard Edition
  • Microsoft Office Word 2003
Keywords: 
kbfindreplace kbtshoot kbprb KB886954

Give Feedback

 

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