Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've had a few documents across my desk that appear to have a corrupted or recursive style for much of the body text:

Char char char char char char

Does anyone know what causes this and how to permanently delete this style? When I try to delete it, it disappears from the Styles and Formatting pane of Word, only to reappear later when different text is selected.

Input or guidance much appreciated.

share|improve this question
    
I assume you are using Word 2003, right? A screenshot would be very helpful –  Nicu Zecheru Mar 9 '10 at 10:34
add comment

1 Answer

up vote 1 down vote accepted

What causes this is when a person uses a newer version of MS Word, then takes the file and uses it in the older version of Word. In other words, using the new version brings in style definitions within the file that the old version doesn't understand and cannot interpret.

To fix this, you can go to the Styles and Formatting pane, select Show: Custom. IN the Style window that appears, find all instances of the char style and delete them. If you cannot delete one of them (which happens to me often), you can run a macro to remove it. Here are the directions:

  1. Open the document
  2. Go to the “Format” menu and select “Styles and Formatting”.
  3. In the “Styles and Formatting” task pane, go down to the “Show” list and select “Custom”.
  4. Locate each of the corrupt char styles in the list and click the checkbox next to its name so it is enabled
  5. Click the “Styles” button on the bottom left of the dialog.
  6. Locate each of the corrupt char styles.
  7. Highlight each of the corrupt style, one at a time, then click the “Delete” button.
  8. If any of the char styles remain undeleted, highlight the entire name of that style and copy it.
  9. Click “Apply” to close the dialog.
  10. You can then paste the name between the parentheses below, where it says “PASTE EXACT NAME OF CHAR STYLE”.
  11. Copy the entire area below from before the first “Sub” to after the second “Sub”.

Sub DeleteChar() Dim styl As Word.Style, doc As Word.Document Set doc = ActiveDocument Set styl = doc.Styles.Add(Name:="replaced") On Error Resume Next doc.Styles("PASTE EXACT NAME OF CHAR STYLE").LinkStyle = styl styl.Delete End Sub

  1. Go back to your document containing the char style.
  2. Go to the “Tools” menu, then “Macro”, then “Visual Basic Editor”.
  3. In the “Project” pane on the left, open “Microsoft Word Objects” and double-click “ThisDocument” under the Project you are working in. (the name of your document will show next to the Project).
  4. Paste the code you copied.
  5. Click the “Save” icon in the Visual Basic editor.
  6. Close the Visual Basic Editor.
  7. In your document, right-click on the char style name in the “Styles and Formatting” pane.
  8. Select “Delete”.
  9. Click within your document, away from the “Styles and Formatting” pane so the style name disappears.
  10. Go to “Tools” – “Macro” – “Macros”.
  11. In the “Macros in” drop-down, select the name of the document you are working on.
  12. Click on the “DeleteChar” macro and select “Run”.
  13. Save your document.
  14. Reopen and verify the char style is gone by going to “Styles and Formatting” – “Show” – “Custom” and making sure it is gone from the list of styles.
  15. Go to “Tools” – “Macro” – “Visual Basic Editor” and locate the macro. Delete all text and resave your document.
  16. Review your document and make sure the correct styles are applied to all text.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.