Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
Does someone have a macro to delete unused styles THAT WORKS? I'm trying to
delete styles that show up under Available Styles in my document's Styles and Formatting pane, but that don't exist in the template attached to the document. As we know, it's very difficult to eliminate styles that were defined for or existed in the document at one time. I've deleted them from the template; I've deleted them several times from the document, and I've deleted them using the Templates and Add-Ins Organizer. Nothing works. I tried one macro that I found on the web, but it parsed all 150 styles, switching between Keep and Delete and then crashed. I'd rather not have one that so confusingly bounces between positive and negative queries. I tried another macro, got runtime errors, and couldn't debug. Any help is appreciated. Quick responses, in particular! Thanks. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
I'm running WORD 2003.
It was Klaus Linke's macro that crashed after going through about 70 Keep/Delete prompts for my style names through the letter L. The line it crashed on, according to the debugger was the myStyle.Delete portion of the following line: Else If MsgBox("Keep?", vbYesNo, myStyle.NameLocal) = vbNo Then myStyle.Delete "Bothell writer" wrote: Does someone have a macro to delete unused styles THAT WORKS? I'm trying to delete styles that show up under Available Styles in my document's Styles and Formatting pane, but that don't exist in the template attached to the document. As we know, it's very difficult to eliminate styles that were defined for or existed in the document at one time. I've deleted them from the template; I've deleted them several times from the document, and I've deleted them using the Templates and Add-Ins Organizer. Nothing works. I tried one macro that I found on the web, but it parsed all 150 styles, switching between Keep and Delete and then crashed. I'd rather not have one that so confusingly bounces between positive and negative queries. I tried another macro, got runtime errors, and couldn't debug. Any help is appreciated. Quick responses, in particular! Thanks. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
|
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
Thanks, Ron. Thankfully, it didn't return any runtime errors and I was able
to remove the offending styles. I'm hoping they stay away! "Ron" wrote: Have you tried http://gregmaxey.mvps.org/Style_Report.htm? It's a bit buggy, but it worked for me. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
I am using Word 2007 - would this work?
If so how do you activate it? If not, is there something else? "Ron" wrote: Have you tried http://gregmaxey.mvps.org/Style_Report.htm? It's a bit buggy, but it worked for me. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
To load the template as an add-in in Word 2007: Office button | Word
Options, Add-Ins category. For "Manage," choose "Templates," and click Go. In the dialog box, click the Add button and navigate to the file. Click OK twice. Now you will find the Scan Document Styles button on the Add-Ins tab on the ribbon. Just click it to run the style report. -- Stefan Blom Microsoft Word MVP "J Weir" wrote in message ... I am using Word 2007 - would this work? If so how do you activate it? If not, is there something else? "Ron" wrote: Have you tried http://gregmaxey.mvps.org/Style_Report.htm? It's a bit buggy, but it worked for me. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
Thanks - it works on some smaller documents but has crashed Word on my larger
documents. Do you any further advice? Thanks "Stefan Blom" wrote: To load the template as an add-in in Word 2007: Office button | Word Options, Add-Ins category. For "Manage," choose "Templates," and click Go. In the dialog box, click the Add button and navigate to the file. Click OK twice. Now you will find the Scan Document Styles button on the Add-Ins tab on the ribbon. Just click it to run the style report. -- Stefan Blom Microsoft Word MVP "J Weir" wrote in message ... I am using Word 2007 - would this work? If so how do you activate it? If not, is there something else? "Ron" wrote: Have you tried http://gregmaxey.mvps.org/Style_Report.htm? It's a bit buggy, but it worked for me. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to delete unused styles - Macro?
Sorry, I don't know what could be causing the problem. Perhaps one of the
creators of the macro, Greg Maxey or Klaus Linke, knows? -- Stefan Blom Microsoft Word MVP "J Weir" wrote in message ... Thanks - it works on some smaller documents but has crashed Word on my larger documents. Do you any further advice? Thanks "Stefan Blom" wrote: To load the template as an add-in in Word 2007: Office button | Word Options, Add-Ins category. For "Manage," choose "Templates," and click Go. In the dialog box, click the Add button and navigate to the file. Click OK twice. Now you will find the Scan Document Styles button on the Add-Ins tab on the ribbon. Just click it to run the style report. -- Stefan Blom Microsoft Word MVP "J Weir" wrote in message ... I am using Word 2007 - would this work? If so how do you activate it? If not, is there something else? "Ron" wrote: Have you tried http://gregmaxey.mvps.org/Style_Report.htm? It's a bit buggy, but it worked for me. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Merge SubDocument Macro | Microsoft Word Help | |||
"How do I delete a Macro from the tool bar? | Microsoft Word Help | |||
Delete and re-format all Styles? | New Users | |||
How to delete unwanted styles from "All styles" list? | Microsoft Word Help | |||
How do I write a macro to find, select, and then delete a Section. | Microsoft Word Help |