View Single Post
 
Old 03-15-2022, 08:03 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
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

The following should work
Code:
Sub Macro1()
Dim oTable As Table
Dim i As Integer
Dim oCell As Cell
Dim oRng As Range
    Set oTable = Selection.Tables(1)
    With oTable
        For i = 2 To .Rows.Count
            For Each oCell In .Rows(i).Cells
                Set oRng = oCell.Range
                oRng.Collapse 1
                oRng.MoveEndWhile Chr(32)
                oRng.Text = ""
                oCell.Range.ParagraphFormat.TabStops.Add _
                        Position:=InchesToPoints(1.41), _
                        Alignment:=wdAlignTabDecimal, _
                        Leader:=wdTabLeaderSpaces
            Next oCell
        Next i
    End With
    Set oTable = Nothing
    Set oCell = Nothing
    Set oRng = Nothing
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