View Single Post
 
Old 06-13-2020, 08:13 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
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

Depending on wwhether you have used [ ] elsewhere in the document the following macro should work


Code:
Sub Macro1()
Dim oRng As Range
Dim oColl As Collection
Dim i As Integer
    Set oColl = New Collection
    Set oRng = ActiveDocument.Range
    With oRng.Find
        Do While .Execute(findText:="\[*,*\]", MatchWildcards:=True)
            oColl.Add oRng.Text
        Loop
    End With
    For i = 1 To oColl.Count
        ActiveDocument.Range.InsertAfter vbCr & oColl(i)
        DoEvents
    Next i
lbl_Exit:
    Set oRng = Nothing
    Set oColl = Nothing
    Exit Sub
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