WD2000: Edit/Replace Fails to Replace Font Kerning Value (209895)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q209895

SYMPTOMS

When you try to replace the font kerning Points and Above value, using either Replace on the Edit menu or from the Visual Basic Editor, the Points and Above value does not change as expected.

WORKAROUND

To work around this problem, use one of the following methods:

Method 1: Manually Change the Values

You can change the font kerning Points and Above value after finding the text you want or formatting from the Font menu.

To change font kerning Points and Above value:
  1. On the Format menu, click Font.
  2. On the Character Spacing tab, click to select Kerning for Fonts.
  3. Set Points and Above equal to the kerning value you want to format the selection.
  4. Click OK.

Method 2: Use the Following Visual Basic for Applications Procedure

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. If you want to find and replace all the font kerning Points and Above values in a document, you can use the following Visual Basic for Applications procedure:

The following Visual Basic for Applications procedure finds all font kerning Points and Above values equal to 12 points in a document and replaces the font kerning Points and Above values to equal 8 points.
Sub ReplaceAllFontKerning()
   If Documents.Count = 0 Then Exit Sub
   Selection.HomeKey Unit:=wdStory
   With Selection.Find
      .ClearFormatting
      .Font.Kerning = 12
      .Text = ""
      .Forward = True
      .Wrap = wdFindContinue
      .Format = True
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
      Do Until .Execute = False
         With Selection
            .Font.Scaling = 100
            .Font.Kerning = 8
            .Collapse
         End With
      Loop
   End With
End Sub
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MajorLast Reviewed:6/17/2005
Keywords:kbbug kbnofix KB209895