Загрузка данных


Sub CreateTable()
    Dim tbl As Table
    Set tbl = ActiveDocument.Tables.Add(Selection.Range, 4, 6)
    With tbl
        .Cell(1, 1).Range.Text = "7."
        .Cell(1, 2).Range.Text = "8."
        .Cell(1, 3).Range.Text = "9."
        .Cell(1, 4).Range.Text = "10."
        .Cell(1, 5).Range.Text = "11."
        .Cell(1, 6).Range.Text = "12."
        
        .Cell(2, 1).Range.Text = "ТАБЛИЦЫ"
        .Cell(2, 2).Range.Text = "РОЗДЕЛЕНИЕ"
        .Cell(2, 3).Range.Text = "ФОРМАТИВ"
        
        .Cell(1, 1).Range.Font.Bold = True
        .Cell(1, 2).Range.Font.Bold = True
        .Cell(1, 3).Range.Font.Bold = True
        .Cell(1, 4).Range.Font.Bold = True
        .Cell(1, 5).Range.Font.Bold = True
        .Cell(1, 6).Range.Font.Bold = True
        .Cell(2, 1).Range.Font.Bold = True
        .Cell(2, 2).Range.Font.Bold = True
        .Cell(2, 3).Range.Font.Bold = True
        
        .Columns(1).Width = 50
        .Columns(2).Width = 50
        .Columns(3).Width = 50
        .Columns(4).Width = 40
        .Columns(5).Width = 40
        .Columns(6).Width = 40
        
        .Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
        .Range.Cells.VerticalAlignment = wdCellAlignVerticalCenter
    End With
End Sub