View Single Post
 
Old 09-21-2018, 08:34 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
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 of
Default

Assuming this is an accurate reflection of your document and the numbers are outline numbers and not text then
Code:
Sub Macro1()
'Graham Mayor - http://www.gmayor.com - Last updated - 22 Sep 2018
Dim oPara As Range
Dim iCount As Integer: iCount = 1
Dim iPara As Integer
    For iPara = 1 To ActiveDocument.Paragraphs.Count
        If ActiveDocument.Paragraphs(iPara).Range.Words(1) Like "Step*" Then
            Set oPara = ActiveDocument.Paragraphs(iPara).Range.Words(1)
            oPara.Bookmarks.Add "Step" & iCount
            iCount = iCount + 1
        End If
    Next iPara
lbl_Exit:
    Set oPara = 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