Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Bothell writer Bothell writer is offline
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Bothell writer Bothell writer is offline
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Ron Ron is offline
external usenet poster
 
Posts: 17
Default How to delete unused styles - Macro?

Have you tried http://gregmaxey.mvps.org/Style_Report.htm?

It's a bit buggy, but it worked for me.


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Bothell writer Bothell writer is offline
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
J Weir J Weir is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
J Weir[_2_] J Weir[_2_] is offline
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Merge SubDocument Macro Beth Microsoft Word Help 2 April 7th 06 07:03 PM
"How do I delete a Macro from the tool bar? WolfMaster Microsoft Word Help 1 November 28th 05 08:27 PM
Delete and re-format all Styles? Jeff C New Users 4 November 23rd 05 12:01 AM
How to delete unwanted styles from "All styles" list? dawn_treador Microsoft Word Help 1 August 17th 05 11:58 PM
How do I write a macro to find, select, and then delete a Section. nw_nick Microsoft Word Help 2 August 8th 05 08:41 PM


All times are GMT +1. The time now is 08:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"