I'm looking for a way to do the following in Microsoft Word 2016:

I'm looking for a way to make a table (or a border) run for as long as the page is, regardless of the content. It has to fill all the height it can, regardless if it contains one row or a 1000 rows.

enter image description here

On the screenshot above, the (1) is a table that should occupy all the space below it, regardless of the content. The table at the bottom of the page (3) is a table that floats to the bottom automatically. If (1) becomes too large to fit on the page, it will automatically push (3) to the next page. This already works by floating (3) to the bottom of the page.

I've not found a way to make my table (1) occupy the entire height. Maybe I'll need to use something else than a table? In that case, it's very important that it's something that I can put a table into. Because the table that you see in (1) will be auto-generated from user data and needs to stay a table. I can put nearly anything around the table, but it has to remain a table and can be styled anyway that's needed. One side note: I already tried to do a textbox, but the table inside a textbox does not work for my purposes (because this file is edited afterwards via .NET programming).

EDIT: an important side note. The screenshot shows two rows, but after processing this can become any number of rows (2, 3, even 10.000 rows are possible).

Does anyone have any ideas? You won't believe how many hours I've already spent on this issue ...

  • 1
    I'm afraid there is no good solution for that. Your second table has not a fixed position there. It's position depends on the first table. And you want row height in your first table to depend on that second table. That's called circular reference in Excel, and although it seems easy, it's very difficult to resolve this common dependency. – Máté Juhász Apr 19 '17 at 8:01
  • 1
    Looking for workaround you may try to use page border, that will look similar, but I think will not be exactly the same as you need. – Máté Juhász Apr 19 '17 at 8:02
  • Thanks for your suggestions. Would it change matters if I gave the second table (3) a fixed position? Or maybe I can put it in the footer for instance and have the footer appear only on the last page? – Steven Lemmens Apr 19 '17 at 8:47
  • There is no option to show footer only on last page. (you can create a section for that but it'll force the last table to a new page, so I think it's not a solution for you). What do you mean by fixed position for the second table? Fixed number of empty paragraphs? Those won't autosize. – Máté Juhász Apr 19 '17 at 9:20
  • I don't know what I exactly meant with a fixed position, I thought it probably was possible. So that's also not an option, I see. Thanks for your answers. – Steven Lemmens Apr 19 '17 at 9:39

I managed it, sort of. It's not perfect, esp. if the variable-length main table gets near the end of a page. Keep With Next paragraph settings just don't seem to work well with floated tables, so the table at the bottom will just start spilling, row by row, to the top of the next page. Nevertheless, as soon as the main table is long enough to push all the rows of the bottom table over the page break, that table will bounce down to the bottom of the following page. Also, at some magnifications, the 'masked' side page borders partially show up. Perhaps further fiddling with some of the values would fix that. At any rate, it's a starting point. I'm hoping others will be able to suggest ways to refine/simplify this.

The main trick is to use a page border, as Máté Juhász suggested in a comment.

First, set a 1 pt solid black page border on the bottom, left, and right (not the top). Click Options, set all the margins to 0 pt, set Measure from to Text, and then clear all 4 check boxes under Options.

Next, insert 3 tables.

Table 1 (this is the one shown at the top of your illustration):

  1. Insert a table that has as many columns and rows as you require.
  2. In Table Properties, set the preferred width to 100% measured in Percentage. Leave the text wrapping set to None. Set 1 pt solid black top and bottom borders (and internal borders, if you want them, though the example in your illustration doesn't have them). The side page borders will serve as side borders.

Table 2 (the main table that will have variable length):

  1. Insert a table that has as many columns and rows as you require. Make sure there's a blank paragraph between this table and table 1.
  2. In Table Properties, set the width to 100% measured in Percentage. Leave the text wrapping set at None, and add a 1 pt solid black top border (and internal borders, if you want them).
  3. Optionally reduce the height of the paragraph between tables 1 and 2. Then select the paragraph and apply white shading to it to mask the side page borders.

Table 3 (at the bottom of the page):

  1. Insert a table that has as many columns as you require and 1 row more than you require.
  2. In Table Properties, set the preferred width to 100% measured in Percentage. Set the text wrapping to Around, and then click Positioning, and set horizontal position to -1 pt relative to Margin (to overlap the left page border), and vertical position to Bottom relative to Margin. Set a 1 pt solid black top and internal borders.
  3. Select the top row of the table, and merge the cells. Then, with the top row still selected, go into Table Properties > Borders and Shading, and apply white shading to this row to 'mask' the side page borders.

    At this point, the right page border wasn't completely masked in my document, so I went back into Table Properties and changed the Measure in field under Size to Points (that's the unit that my version of Word is set to use, instead of inches or cm). I then increased the width slightly, by 2 pts or so. This field is a bit tricky, because some values just don't 'take,' so you might have to increase or decrease the left or right page margin by 1/2 pt or so to get everything to line up.

  4. Optionally adjust the paragraph settings for the top row so that it matches the empty paragraph between tables 1 and 2.

  5. Set the blank paragraph between tables 2 and 3 to an exact height of 1 pt, with no space above or below, to effectively hide it.

Here's the bottom of my page. The dots circled in red show the tiny paragraph between the main table and the bottom table, though the main table actually appears to end much lower. (Of course those dots are visible at all only because I have paragraph marks visible.)

Finished table


This works in Word 365 and should work in Word 2016..

  1. Select the row you need to resize, in your case, the row you marked as "1".
  2. Right click and select "Table Properties" enter image description here
  3. Select "Row" enter image description here
  4. Specify the minimum height you need (you will need to play with this to match your table) then make sure you have the "Row height is:" box set to "At least" enter image description here
  • 1
    Sorry, I should have specified specifically: that I don't know the number of rows the table will have in advance. This is a template and a process will replace the table and add rows dynamically. So I need a way to make the table autosize, not the second row. Otherwise the 3rd, 4th, ... row will all have the same size. I'll update my question. – Steven Lemmens Apr 19 '17 at 7:58
  • 1
    Hmmm, as others have commented, I do not think this is possible, yet :( – Kevin Anthony Oppegaard Rose Apr 19 '17 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.