ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Hacking Word
Subject:   Hack #55: Clean Out Linked “Char” Styles
Date:   2005-12-12 08:52:24
From:   andrewsavikas
Response to: Hack #55: Clean Out Linked “Char” Styles

Hi Firbolg,


Sorry you had trouble with the macro. Tackling the "Char Char" problem was thorny, and this macro is certainly a "hack" indeed. I have occasionally had an issue with infinite looping on particularly bad documents (with many, many of those styles). In those situations, I use a slightly modified version of the XSLT stylesheet shown in Hack 98 of the book. Unfortunately, that only works with Word 2003. If you are running Word 2003, I suggest trying that method out, as it's far more reliable than VBA at cleansing this sort of thing.


If you'd like, you can send me the document that's looping (you can remove the text), and I'd be happy to take a look at it. andrews at oreilly dot com.


Cheers,
Andrew Savikas