Again, I used the Organizer to reestablish these. had lost the outline numbering and instead had reverted to a different numbering schema, different fonts, different colours, etc. I could easily import them back in using the Organizer.
These were easy enough to add back in by copy/pasting from the original document, but be aware that this content, if you use it, may disappear. in the headers/footers and main body of the document-the control boxes were still there, but the content was gone.
But the resulting document had further issues that would have to be fixed manually. However, all the unused styles still remaining after running the Method 3 macro were copied across, even though all indications are that they AREN’T used. This time the copied text (all 440p) pasted quickly (within a minute) and Word didn’t hang. Method 4: Method 3 + Method 1Īs a final test, I took the copy of the document I’d saved from Method 3 and ran Method 1 on it that is, I ran Paul Edstein’s macro, then used the Maggie method to put the document into a new blank document. These styles were user-added (not inbuilt styles) and as far as I know, were not linked to other styles, though it’s difficult to tell what’s linked to what. However, when I checked them, many of the unused styles were still listed and hadn’t been deleted at all. This one took about 25 mins to run on my 440p document, and the list of styles seemed to reduce. Supposedly, this one didn’t remove header and footer styles, which are always listed as unused even when they are (yes, that’s Word being Word…). The next macro was one from Paul Edstein (a variation of Allen Wyatt’s DeleteUnusedStyles macro) that I found here. This may be a solution for a smaller document, but didn’t work for me-I expect a macro to take a few minutes at most. However, I got ‘not responding’ in Word again, and after 40 mins waiting for something to happen, I killed the process again. From another forum I was aware that the header/footer styles might get removed using his macro, so I was ready to check that. The next thing I tried was a macro from Allen Wyatt, the WordTips guy. (See Method 4 for some issues I found using this method on a complex document.) Method 2: Allen Wyatt’s macro However, I haven’t written off this method as it could be a good solution for smaller documents with many styles.
After 45 minutes waiting for the copied text in the 440p document to paste, with ‘not responding’ in the title bar of Word, I finally killed the process. It seemed an ideal solution-quick and simple, with the outcome I wanted. One used a version of ‘maggying’ a document (named for the late Maggie Secara, after whom the technique is named), so I tried that first-why use brute force if something simple can achieve what you want? Method 1: Maggie the document and put it into a new blank document My Google searching led me to a couple of sites and forums that seemed to address this issue, a couple of which used macros to achieve the task. I printed the list of styles to PDF-this document was 129p long! It also had hundreds of styles, many of which seemed to be unused, that seemed to have come in from other documents or had been created for a specific need-it was these I was trying to get rid of quickly. Test environment: I used a copy of a client’s 440p document, which had appendices, outline numbering, portrait/landscape sections, headers and footers, control boxes for doc properties that were repeated in the headers/footers, automated cross-references, automated caption numbering etc. with control boxes for document properties, outline numbering, modified settings for inbuilt styles such as heading and TOC styles), you could be making more work for yourself than doing it manually, consider using the macro in Method 5 (added after this post was originally written). BUT if you have a large complex document (e.g. Deleting them manually, even using the Organizer (see my blog post on this: ), is tedious, so I wanted to find if there was an easier way using a macro or similar.īottom line: It may be easier to use a macro or one of the other methods (1 to 4) described below if you have a fairly short and not terribly complex document.
Keyboard shortcut for paste special how to#
Today I went down the rabbit hole of how to delete hundreds of unused styles in a document.