![]() |
|
|
|
#1
|
||||
|
||||
|
The following macro deletes all user-defined Linked Styles in a document. It's not clear what more you might want to do. Code:
Sub CleanStyles()
Dim oSty As Style
With ActiveDocument
On Error Resume Next
For Each oSty In .Styles
If oSty.Linked = True Then
.Styles.Add Name:="TmpSty"
oSty.LinkStyle = "TmpSty"
.Styles("TmpSty").Delete
End If
If oSty.BuiltIn = False Then oSty.Delete
Next
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing legends in graph if linked excel file is not available? | DatS | Word | 3 | 10-18-2015 05:44 PM |
Set style for part of paragraph
|
meileetan | Word | 7 | 06-07-2013 01:09 AM |
Removing a paragraph style from the TOC
|
CTwriter | Word | 3 | 01-25-2013 12:38 AM |
| Paragraph Style for Thesis | groxby | Word | 1 | 03-24-2012 04:45 AM |
| Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |