![]() |
|
|
|
#1
|
|||
|
|||
|
Does anyone know if there is a Macro out that that you can use to change any content in your document from Linked to Paragraph. Our Company style sheet is all Paragraph and character styles - when sending out to SME's they will input content that apparently has old styles that are linked. We have now found a way to lock down our styles/formatting in our document before sending out. But now we need to get all of our content cleaned up so that there are not any linked styles. We do have a manual way of doing it. Wanted to see if anyone has written a Macro that would do it much quicker. Thanks |
|
#2
|
||||
|
||||
|
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] |
|
#3
|
|||
|
|||
|
Thank you. So when I run the macro that you have below and it deletes the linked style - will it go to a Normal style and then I manually put it back to the style we had except it is Paragraph not linked?
|
|
#4
|
||||
|
||||
|
That is Correct.
__________________
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 |