WD98: Character Format Functions Ignore Leading, Trailing Spaces

Last reviewed: March 9, 1998
Article ID: Q182094
The information in this article applies to:
  • Microsoft Word 98 Macintosh Edition

SYMPTOMS

In Microsoft Word, the following character formatting functions ignore leading and trailing spaces when they evaluate a string:

    x = Selection.Font.Hidden
    x = Selection.Font.Bold
    x = Selection.Font.Italic
    x = Selection.Font.Underline

For example, if the text in a selection is formatted as hidden, but the spaces at the beginning or end of the selection are not formatted as hidden, the Hidden function returns -1 (True). This indicates that the entire selection is hidden, even though there are unhidden spaces at the beginning or end of the selection.

CAUSE

This functionality is consistent with the functionality of other features in Word, such as the Format Font dialog box and Formatting toolbar. All these Word features disregard trailing and leading spaces when they evaluate a selection.

MORE INFORMATION

For information about how to use WordBasic character formatting functions in earlier versions of Word, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q106075
   TITLE     : WD: Character Format Functions Ignore Leading or Trailing
               Spaces

REFERENCES

For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q163435
   TITLE     : VBA: Programming Resources for Visual Basic for
               Applications


Additional query words: font hidden bold italic italics underline
underscore underlining italicize bolding hiding hide selection beginning
ending vb vbe vba
Keywords : kbdta kbdtacode kbfont kbformat macword98
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb
Solution Type : kbnofix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 9, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.