Microsoft KB Archive/839646

= Unusual style names appear in the &quot;Styles and Formatting&quot; list in Word =

Article ID: 839646

Article Last Modified on 12/19/2006

-

APPLIES TO


 * Microsoft Office Word 2007
 * Microsoft Office Word 2003
 * Microsoft Word 2002 Standard Edition
 * Microsoft Word 2000 Standard Edition

-



SYMPTOMS
You click Styles and Formatting on the Format menu to view your styles list in Microsoft Word 2000, in Microsoft Word 2002, or in Microsoft Office Word 2003.

Alternatively, you click the Styles button in the Styles group on the Home tab to open the Styles pane in Microsoft Office Word 2007.

When you do this, you may notice that unusual style names are listed.

For example, the last saved on, the last printed by, or the create date style names may appear in the Styles and Formatting list although they are not part of your document.



CAUSE
This issue may occur when you create AutoText entries that contain large blocks of text.



WORKAROUND
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. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

To remove these unusual styles names from the Styles and Formatting list, create and then run the following Microsoft Visual Basic for Applications (VBA) macro.

Note The following sample macro may also remove custom styles that are listed as being available but are not being used in the document. Sub CleanStyles

On Error Resume Next

Dim st As Style

For Each st In ActiveDocument.Styles

If st.InUse Then With ActiveDocument.Range.Find .ClearFormatting .Style = st.NameLocal If .Execute(Format:=True, Wrap:=wdFindStop) = False Then st.Delete End If

End With End If

Next

End Sub

Additional query words: wd2000 wd2002 wd2003 WD2007 - Page – Author Page # Date Confidential Page # Date Created by Created on Filename and path Last printed Last saved by Page X of Y

Keywords: kbprb KB839646

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.