View Single Post
 
Old 01-19-2021, 11:30 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default

Found that too. I've done all manually, but tweaked it with scripts from other tables and rows.

Code:
Sub Create_Dot_Leader_1Tbl_Col_1_SpacedOut()
    Application.ScreenUpdating = False
    Dim oTbl As Table
    Dim oRow As Row
    Dim oCell As cell

  Set oTbl = Selection.Tables(1)
    With Selection.ParagraphFormat
        .TextboxTightWrap = wdTightNone
        .CollapsedByDefault = False
    End With
    Selection.ParagraphFormat.TabStops.ClearAll
    ActiveDocument.DefaultTabStop = InchesToPoints(0.25)
    Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(5.25), _
        Alignment:=wdAlignTabRight, Leader:=wdTabLeaderDots
    
  oTbl.Columns(1).Select
  For Each oRow In oTbl.Rows
    
    Selection.SelectRow
    Selection.HomeKey Unit:=wdLine
    Selection.EndKey Unit:=wdLine
    Selection.TypeText Text:=vbTab
    Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
    With Selection.Font
        .Bold = False
        .Color = wdColorAutomatic
        .Superscript = False
        .Subscript = False
        .Spacing = 2
        .Scaling = 100
        .Position = 0
    End With
    Selection.Move Unit:=wdRow, Count:=1
    
    Next oRow
     On Error Resume Next

    Application.ScreenUpdating = True

    On Error GoTo 0

End Sub
Reply With Quote