View Single Post
 
Old 11-21-2022, 06:26 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
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

The first part can easily be achieved using Document Batch Processes with the following custom process. The second part would require more information about what to look for and what to replace it with.

Code:
Function FixTable(oDoc As Document) As Boolean
Dim oTbl As Table
Dim i As Long
    On Error GoTo Err_Handler
    For Each oTbl In oDoc.Tables
        For i = oTbl.Rows.Count To 1 Step -1
           Select Case i
            Case 2, 3, 4
                oTbl.Rows(i).Delete
            Case Else
           End Select
        Next i
    Next oTbl
    FixTable = True
lbl_Exit:
    Exit Function
Err_Handler:
    FixTable = False
    Resume lbl_Exit
End Function
__________________
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