Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-26-2015, 08:44 AM
Rose43526 Rose43526 is offline Changing a Linked Style to Paragraph with a Macro Windows 10 Changing a Linked Style to Paragraph with a Macro Office 2010 64bit
Novice
Changing a Linked Style to Paragraph with a Macro
 
Join Date: Oct 2015
Posts: 2
Rose43526 is on a distinguished road
Default Changing a Linked Style to Paragraph with a Macro

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
Reply With Quote
  #2  
Old 10-26-2015, 03:14 PM
macropod's Avatar
macropod macropod is offline Changing a Linked Style to Paragraph with a Macro Windows 7 64bit Changing a Linked Style to Paragraph with a Macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 10-27-2015, 06:10 AM
Rose43526 Rose43526 is offline Changing a Linked Style to Paragraph with a Macro Windows 10 Changing a Linked Style to Paragraph with a Macro Office 2010 64bit
Novice
Changing a Linked Style to Paragraph with a Macro
 
Join Date: Oct 2015
Posts: 2
Rose43526 is on a distinguished road
Default Linked to Paragraph

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?
Reply With Quote
  #4  
Old 10-27-2015, 02:02 PM
macropod's Avatar
macropod macropod is offline Changing a Linked Style to Paragraph with a Macro Windows 7 64bit Changing a Linked Style to Paragraph with a Macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That is Correct.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



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
Changing a Linked Style to Paragraph with a Macro Set style for part of paragraph meileetan Word 7 06-07-2013 01:09 AM
Changing a Linked Style to Paragraph with a Macro 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft