• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. Word 2003 XML Hacks > 98. Remove Linked “Char” Styles with XSLT

Remove Linked “Char” Styles with XSLT

This hack shows you how to clean out the hidden, linked character styles Word likes to spontaneously create with a dose of XSLT.

[Hack #55] showed how to use VBA to remove unwanted linked character styles from your Word documents. Word 2003 gives you another option: XSLT.

To see how this works, create a new document and deliberately create a linked style, as described in [Hack #55] . Save the file as linkedCharStyle.xml.

The Code

Enter the following code in a standard text editor such as Notepad, save it as removeLinkedCharStyles.xsl, and then put it in the same folder as linkedCharStyle.xml:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint