![]() |
|
#2
|
|||
|
|||
|
Perhaps:
Code:
Sub ScratchMacro()
'A basic Word Macro coded by Gregory K. Maxey
Dim oStyle As Style, oStyleValidate As Style
Dim oDocValidate As Document
Dim oTmp As Template
Set oTmp = ActiveDocument.AttachedTemplate
Set oDocValidate = oTmp.OpenAsDocument
Set oStyle = ActiveDocument.Styles("Style1")
For Each oStyle In ActiveDocument.Styles
On Error Resume Next
Set oStyleValidate = oDocValidate.Styles(oStyle.NameLocal)
If Err.Number <> 0 Then
oStyle.Delete
Err.Clear
End If
Next oStyle
oDocValidate.Close wdDoNotSaveChanges
lbl_Exit:
Exit Sub
End Sub
|
| Tags |
| style, vba, word 16 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
USB disconnected while document was live; saved document now corrupt. How do I retrieve document?
|
MaxB | Word | 2 | 07-01-2019 04:42 PM |
| My style keeps changing, can't get saved style to apply | Meenie50 | Word | 7 | 07-20-2017 03:47 PM |
| Keyboard shortcut or QAT button for a saved paragraph style? | VeazyT | Outlook | 0 | 05-15-2017 01:38 PM |
| How to make a fillable word template but not see what is not req'd to be filled in saved as document | sjohnstone@edgeautomation | Word | 1 | 05-02-2017 10:05 AM |
Saved style set changing
|
ljd108 | Word | 1 | 10-21-2014 11:43 AM |