Можно ли разделить таблицу на несколько частей по строкам без пробелов между ними в Word

Степан Федин 20 Баллы репутации
2025-11-06T03:22:25.55+00:00

Создал таблицу в Word, мне нужно разделить ее по строкам, чтобы каждая строка считалась отдельной таблицей, но при этом чтобы между ними не было пробела. То есть должна быть одна таблица, но строки у нее считаются как отдельные таблицы.

Microsoft 365 и Office | Прочее
Microsoft 365 и Office | Прочее

Другие темы, которые не попадают под определенные категории.

Комментариев: 0 Без комментариев

Ответ, принятый автором вопроса
Kimberly Olaño 23,615 Баллы репутации
2025-11-07T06:14:30.7866667+00:00

Yes there's a way to do that, and it requires turning off all auto width adjustment mechanisms. Make sure you don't miss a step below.

Click anywhere inside the table.

Go to Table Tools then Layout then AutoFit.

Make sure “Fixed Column Width” is selected.

  • If “AutoFit to Window” or “AutoFit to Contents” is selected, columns will still move when the page width changes.

Next is, right-click inside the table then Table Properties.

  • On the Table tab:
    • Set a Preferred width (in cm or inches).
    • Choose Measure in: Centimeters (not percent). Using percent makes width relative to window size.
  • Click Options... (bottom right) and ensure:
    • “Automatically resize to fit contents” is unchecked.
    • Cell margins are fixed (e.g., left/right: 0.19 cm default).
  • Click OK then OK.

This stops table and column scaling when the window or margins change.

Now, if certain columns still adjust:

Select those columns.

Right-click then Table Properties then Column tab.

Check Preferred width, enter a numeric value, and click OK.

  • This locks the exact column width and disables dynamic resizing at the cell level.

Этот ответ помог вам?

Комментариев: 0 Без комментариев

Дополнительные ответы: 8

Сортировать по: Самые старые
  1. Kimberly Olaño 23,615 Баллы репутации
    2025-11-07T04:29:11.5633333+00:00

    Okay, let's replace continue for, that's causing the error.

    Sub SplitTableIntoSingleRowTables_Safe()

    Dim tbl As Table

    Dim i As Long

    On Error Resume Next

    Set tbl = Selection.Tables(1)

    On Error GoTo 0

    If tbl Is Nothing Then

    MsgBox "Please place the cursor inside the table you want to split.", vbExclamation

    Exit Sub

    End If

    ' Loop from bottom row up to the second row (we keep the top as the last table head)

    For i = tbl.Rows.Count - 1 To 1 Step -1

    On Error GoTo SkipRow ' If an error occurs (e.g. merged cells) jump to SkipRow

    tbl.Rows(i).Select

    Selection.SplitTable

    Selection.MoveDown Unit:=wdLine, Count:=1

    If Selection.Paragraphs.Count > 0 Then Selection.Delete

    On Error GoTo 0 ' Clear error handler for the normal path

    ContinueLoop:

    Next i

    MsgBox "Done! Rows that could not be split (merged vertically) were skipped.", vbInformation

    Exit Sub

    SkipRow:

    ' Clear the error and resume at the label just before Next i

    Err.Clear

    On Error GoTo 0

    Resume ContinueLoop

    End Sub

    Reminder, place your cursor inside the table you want to split before running the macro.

    Этот ответ помог вам?


  2. Kimberly Olaño 23,615 Баллы репутации
    2025-11-07T05:06:25.93+00:00

    You may have to manually remove those merged rows manually so everything row is on a different line.

    Этот ответ помог вам?


  3. Kimberly Olaño 23,615 Баллы репутации
    2025-11-07T05:16:16.0166667+00:00

    Technically, here are the answers:

    • Word tables have a fixed total width. When you resize one column, Word adjusts neighboring columns to keep the table’s total width constant.
    • AutoFit is usually enabled. With AutoFit on, Word automatically resizes columns and cells based on content or window size, overriding manual adjustments.
    • Merged cells lock certain widths. If a cell spans multiple columns, Word preserves its combined width, so manual resizing snaps back.

    Этот ответ помог вам?


  4. Lutter 0 Баллы репутации
    2026-06-15T18:10:09.8633333+00:00
    I would like do this 
    // CREATE TABLE Categories (
    //     Id INT PRIMARY KEY IDENTITY(1,1),
    //     Name NVARCHAR(100) NOT NULL UNIQUE
    // );
    //
    // CREATE TABLE Manufacturers (
    //     Id INT PRIMARY KEY IDENTITY(1,1),
    //     Name NVARCHAR(100) NOT NULL UNIQUE
    // );
    //
    // CREATE TABLE Products (
    //     Id INT PRIMARY KEY IDENTITY(1,1),
    //     Name NVARCHAR(200) NOT NULL,
    //     Description NVARCHAR(MAX),
    //     Price DECIMAL(18,2) NOT NULL CHECK (Price >= 0),
    //     Stock INT NOT NULL CHECK (Stock >= 0),
    //     Discount INT NOT NULL DEFAULT 0 CHECK (Discount BETWEEN 0 AND 100),
    //     ImagePath NVARCHAR(500),
    //     CategoryId INT NOT NULL FOREIGN KEY REFERENCES Categories(Id),
    //     ManufacturerId INT NOT NULL FOREIGN KEY REFERENCES Manufacturers(Id)
    // );
    //
    // CREATE TABLE Users (
    //     Id INT PRIMARY KEY IDENTITY(1,1),
    //     Login NVARCHAR(50) NOT NULL UNIQUE,
    //     Password NVARCHAR(100) NOT NULL,
    //     FullName NVARCHAR(200) NOT NULL,
    //     Role NVARCHAR(50) NOT NULL CHECK (Role IN ('Администратор', 'Менеджер', 'Клиент')),
    //     IsBlocked BIT NOT NULL DEFAULT 0
    // );
    //
    // CREATE TABLE Orders (
    //     Id INT PRIMARY KEY IDENTITY(1,1),
    //     OrderDate DATETIME NOT NULL DEFAULT GETDATE(),
    //     PickupDate DATETIME,
    //     Status NVARCHAR(50) NOT NULL DEFAULT 'Новый',
    //     PickupAddress NVARCHAR(500),
    //     UserId INT NOT NULL FOREIGN KEY REFERENCES Users(Id)
    // );
    //
    // CREATE TABLE OrderItems (
    //     Id INT PRIMARY KEY IDENTITY(1,1),
    //     OrderId INT NOT NULL FOREIGN KEY REFERENCES Orders(Id),
    //     ProductId INT NOT NULL FOREIGN KEY REFERENCES Products(Id),
    //     Quantity INT NOT NULL CHECK (Quantity > 0)
    // );
    //
    // -- Вставка начальных данных
    // INSERT INTO Categories (Name) VALUES ('Кроссовки'), ('Ботинки'), ('Сандалии');
    // INSERT INTO Manufacturers (Name) VALUES ('Nike'), ('Adidas'), ('Reebok');
    // INSERT INTO Users (Login, Password, FullName, Role) VALUES
    // ('admin', 'admin123', 'Администратор', 'Администратор'),
    // ('manager', 'manager123', 'Менеджер Иванов', 'Менеджер'),
    // ('user', 'user123', 'Клиент Петров', 'Клиент');
    

    Этот ответ помог вам?


Ваш ответ

Автор вопроса может устанавливать для ответов пометку "Принято", а модераторы — пометку "Рекомендуется". Благодаря этому пользователям становится проще понять, какой из ответов помог решить проблему автора.