View Single Post
 
Old 07-26-2019, 02:05 AM
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

Probably something like
Code:
Sub Macro1()
Dim oTable As Table
Dim oRng As Range
Dim oRow As Row
Const strText As String = "Text to find"
    Set oTable = Selection.Tables(1)
    For Each oRow In oTable.Rows
        If InStr(1, oRow.Range, strText) > 0 Then
            Set oRng = oRow.Range
            oRow.ConvertToText Separator:=Chr(9)
            oRng.Font.Bold = True
            oRng.Font.Size = 14
            oRng.ParagraphFormat.Alignment = wdAlignParagraphCenter
            oRng.InsertParagraphBefore
        End If
    Next oRow
lbl_Exit:
    Set oTable = Nothing
    Set oRng = Nothing
    Set oRow = 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