![]() |
|
|
|
#1
|
|||
|
|||
|
All documents have access to hundreds of styles built into Word. You cannot change that.
You can Restrict Editing to a selection of Styles under the Developer Tab. You can also remove styles from the Home Tab. Here is a macro to do that: Code:
Sub StylesQuickStylesOff()
' Charles Kenyon 2018-12-03
'
' This is preparatory to saving a Quick Style Set for only certain styles
' Strips all styles from quickstyles gallery
'
'
Dim aStyle As Style
On Error Resume Next
For Each aStyle In ActiveDocument.Styles
aStyle.QuickStyle = False
Next aStyle
On Error GoTo -1
End Sub
Code:
Sub StylesDeleteUnusedStyles()
' Allen Wyatt
' https://word.tips.net/T001337_Removing_Unused_Styles.html
'
Dim oStyle As Style
'
For Each oStyle In ActiveDocument.Styles
'Only check out non-built-in styles
If oStyle.BuiltIn = False Then
With ActiveDocument.Content.Find
.ClearFormatting
.Style = oStyle.NameLocal
.Execute FindText:="", Format:=True
If .Found = False Then oStyle.Delete
End With
End If
Next oStyle
End Sub
|
|
#2
|
|||
|
|||
|
Thanks for this Charles,
One problem with Restricting Editing is that MultiLevel lists are also disabled - I cannot find a way to have restrictions and lists... |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Template with background colors has extra blank page that will not delete. | jspinelli27 | Word | 1 | 03-11-2018 02:27 PM |
Changing my Excel 2010 Blank/Default Template
|
revmwilson8 | Excel | 1 | 08-09-2016 02:57 AM |
Is there a blank CD inlay jewel case template
|
philbox | Word | 4 | 11-29-2015 06:48 AM |
| Blank Keyboard Template Needed | LTCSZ | Word | 0 | 09-12-2014 05:27 PM |
want to make letterhead template with second page blank
|
William Whitney | Word | 4 | 06-20-2014 05:59 AM |