Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-13-2022, 03:24 AM
gmayor's Avatar
gmayor gmayor is offline Collecting style text Windows 10 Collecting style text Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

That should be simple enough. Try the following
Installing Macros

Code:
Sub Macro1()
Const sName As String = "Strong"    ' the name of the character style
Dim orng As Range
    Set orng = ActiveDocument.Range
    With orng.Find
        .Style = sName
        .Text = ""
        Do While .Execute
            ActiveDocument.Range.InsertAfter orng.Text & vbCr
        Loop
    End With
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Collecting data from a moving field. (I think) dobbin004 Excel 1 01-02-2018 01:03 AM
Collecting style text Macro to search warning text style and replace the text color rohanrohith Word VBA 3 11-27-2014 01:08 PM
Matching text style to drawing object style notarichman PowerPoint 0 03-07-2011 11:34 AM
Collecting Metrics in Project TimJimO Project 0 12-29-2010 12:12 PM
Need to delete style and style text mclan Word 0 08-04-2008 12:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:00 AM.


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