Direct Character Formatting Removed When You Apply Style
PSS ID Number: Q102396
Article last modified on 07-14-1994

2.00 2.00a 2.00a-CD 2.00b 2.00c

WINDOWS


-------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b,
   2.0c
-------------------------------------------------------------------

SYMPTOMS
========

When you apply a different style to text that contains more than 50
percent of a specific type of direct character formatting (such as
underline, italics, or bold), Word for Windows removes that character
formatting.

Word does not remove direct character formatting if the text to which
you are applying a different style contains less than 50 percent of
the direct character formatting or if you also select the paragraph
mark preceding the paragraph to which you are applying the style.

CAUSE
=====

This functionality is by design, and it is described on page 217 in
"Microsoft Word for Windows User's Guide." However, this reference
does not specifically state the 50 percent, or "half or more" rule
that Word uses to determine whether to remove direct character
formatting or not.

WORKAROUNDS
===========

Use one of the following workarounds to retain direct character formatting
when you apply style formatting:

Workaround 1
------------

Apply the direct formatting after you apply the new style.

Workaround 2
------------

When you select the text to which you want to apply a style, include
the preceding paragraph mark in your selection. When you apply the
style to this selection, Word retains direct character formatting.

Workaround 3
------------

To apply styles one paragraph at a time while retaining direct
character formatting, select the paragraph text (not the paragraph
mark), and use the Cut command from the Edit menu to move the
paragraph to the Windows Clipboard. Apply the new style to the blank
paragraph, then paste the text into the paragraph. Word does not
remove the direct character formatting.

Below is a macro to automate Workaround 3. In the macro text, replace
"Stylename" with the name of the style you want to apply (be sure to
enclose the style name in quotation marks).

   Sub Main
   EditGoTo .Destination = "\para"
   CharLeft 1, 1
   EditCut
   FormatStyle .Name = "stylename", .Apply
   EditPaste
   End SUB

WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN
RISK. Microsoft provides this macro code "as is" without warranty of any
kind, either express or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.

REFERENCES
==========

Word for Windows "User's Guide," version 2.0, page 217

"Word for Windows Companion," Mark Crande and M. David Stone & Alfred
Poor, Microsoft Press, 1992, pages 347-348

Additional reference words: 2.00 2.00a 2.00a-CD 2.00b 2.00c docerr
winword w4wformat

=============================================================================

Copyright Microsoft Corporation 1994.
