WD2000: Edit/Replace Fails to Replace Font Kerning Value

ID: Q209895


The information in this article applies to:


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, 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 the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/
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 this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words:


Keywords          : kbdta wd2000 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 13, 1999