word2003 - set table row height to zero

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13099
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

word2003 - set table row height to zero

Post by ChrisGreaves »

I have reason to believe that a zero-height row in a table in an MSWord document is unsupported.

I can set the height to 0.01 with no problem, and this converts thirty null rows into an ugly solid black block of very, very tiny rows.

I really want to hide the rows, so I suspect that I should be using Access for this table. Or even (shudder!) using Excel for a data table.

Once again I am really most interested in the logic. I can accept that MSWord doesn't support zero-height rows, but I cannot see why this should be a design limitation (excepting for an arbitrary decision NOT to support zero-height rows).

If some version of Word other than Word2003 allows the user to set the height to zero (as in Table, Properties, Row, Specify height) then I think that this would be a programming or design flaw limited to Word2003.

Thanks
Chris
You do not have the required permissions to view the files attached to this post.
Don’t let a good crisis go to waste

User avatar
Leif
Administrator
Posts: 7249
Joined: 16 Jan 2010, 08:21
Location: UK/France

Re: word2003 - set table row height to zero

Post by Leif »

Chris, if 0 is not accepted, have you tried entering a negative value? You may find that instead of a black block, you get a nice black hole...

:blackhole:     :blackhole:     :blackhole:     :blackhole:     :blackhole:
Leif.

User avatar
HansV
Administrator
Posts: 73819
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: word2003 - set table row height to zero

Post by HansV »

In Word 2021, the minimum row height is 1 point (1/72 inch).

You could set the font of a row to Hidden. That would effectively hide the row.
Regards,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13099
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: word2003 - set table row height to zero

Post by ChrisGreaves »

HansV wrote:
07 Jan 2022, 16:40
In Word 2021, the minimum row height is 1 point (1/72 inch).

You could set the font of a row to Hidden. That would effectively hide the row.
Thank you, Hans. I was trying to hide the row (as a rectangular structure) but had not realized that hiding the content of the row would hide the structure itself. I wanted to hide the structure and content, so I could see what I should eat, and avoid looking for food that had already been eaten.
Font Hidden does what I want.

As far as a minimum height of one point goes, I have sat in design meetings where the loudest voice said that a zero-height row in meaningless, and feel saddened that their geometry teacher was not as good as Mr. Brian Feld :evilgrin:

I will maintain my stance that a zero-height row in an MSWord table is meaningful.

Cheers
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13099
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: word2003 - set table row height to zero

Post by ChrisGreaves »

Leif wrote:
07 Jan 2022, 16:29
Chris, if 0 is not accepted, have you tried entering a negative value? You may find that instead of a black block, you get a nice black hole...
That's a reLeif! I had been trying that (decrementing row-height), but every time the row-height approached zero there was a sort of click-whirr-click and then Excel2003 opened up with not one but THREE new worksheets, void of any trace of my data!
:scratch: :thinks: :weep: :woops:
Cheers
Chris
Don’t let a good crisis go to waste

User avatar
HansV
Administrator
Posts: 73819
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: word2003 - set table row height to zero

Post by HansV »

ChrisGreaves wrote:
07 Jan 2022, 18:47
void of any trace of my data!
That was because the data went into the black hole...
Regards,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13099
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: word2003 - set table row height to zero

Post by ChrisGreaves »

HansV wrote:
07 Jan 2022, 19:30
ChrisGreaves wrote:
07 Jan 2022, 18:47
void of any trace of my data!
That was because the data went into the black hole...
Fer sure.
But did you notice that it created three parallel universes?
Cheers
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13099
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: word2003 - set table row height to zero

Post by ChrisGreaves »

HansV wrote:
07 Jan 2022, 16:40
You could set the font of a row to Hidden. That would effectively hide the row.

Code: Select all

Sub Filter1()
    Dim tbl As Table
    Set tbl = Selection.Tables(1)
    With tbl
        Dim lng As Long
        For lng = 1 To tbl.Rows.Count
            tbl.Rows(lng).Range.Select
            If Len(tbl.Rows(lng).Cells(3).Range) <= 2 Then ' Quanity in stock is null=zero
'                tbl.Rows(lng).HeightRule = wdRowHeightExactly
'                tbl.Rows(lng).Height = CentimetersToPoints(0.01) ' shrinks to a very small height
'                tbl.Rows(lng).Height = CentimetersToPoints(0#) ; shows no visible effect
                tbl.Rows(lng).Range.Font.Hidden = True
            Else
            End If
        Next lng
    End With
End Sub
Untitled.png
Now to print out my lunch menus for the next three months ...

Traps for young players:I wasted spent three minutes rebuilding my table, applying borders, rebuilding my table, applying borders, rebuilding my table, applying borders, until it dawned on me that I was never going to see that bottom border.
The bottom border still exists in the table, but it will not show in my filtered list because the FONT in text content is hidden, and that hides the row structures, and hence it hides the row borders. :doh:
What appears to be the bottom row of the table in this screenshot is really row 378 of my table - an interior row!
Thanks again
Chris
You do not have the required permissions to view the files attached to this post.
Don’t let a good crisis go to waste