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
word2003 - set table row height to zero
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
word2003 - set table row height to zero
You do not have the required permissions to view the files attached to this post.
He who plants a seed, plants life.
-
- Administrator
- Posts: 7213
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: word2003 - set table row height to zero
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...
Leif
-
- Administrator
- Posts: 78558
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: word2003 - set table row height to zero
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.
You could set the font of a row to Hidden. That would effectively hide the row.
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: word2003 - set table row height to zero
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
I will maintain my stance that a zero-height row in an MSWord table is meaningful.
Cheers
Chris
He who plants a seed, plants life.
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: word2003 - set table row height to zero
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!
Cheers
Chris
He who plants a seed, plants life.
-
- Administrator
- Posts: 78558
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: word2003 - set table row height to zero
That was because the data went into the black hole...
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: word2003 - set table row height to zero
Fer sure.
But did you notice that it created three parallel universes?
Cheers
Chris
He who plants a seed, plants life.
-
- PlutoniumLounger
- Posts: 15641
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: word2003 - set table row height to zero
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
Traps for young players:I
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.
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.
He who plants a seed, plants life.