Measuring height of table 
Author Message
 Measuring height of table

Hello to all.
I am trying to measure the height of a table as it will print.  Everything I
try returns the value as of the minimum height of each row, so that no
matter how many lines of text is found within a cell (and therefore how much
space will be taken up on the printed page) the same minimum height is
returned.  The code I'm using is as follows:

Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
    'the table has previously been bookmarked.
    If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
        ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
        Set MedList = Selection.Tables(1)
        hgt = 0
        With MedList
            .Rows.HeightRule = wdRowHeightAtLeast     'this has been
inserted as the default property for the table in question is

'wdRowHeightAuto.  If left at this the height returned is almost infinite.

'Using wdRowHeightExactly returns the same value as

'wdRowHeightAtLeast  but makes invisible some of the table's text.
            NoOfRows = .Rows.Count
            For x = 1 To NoOfRows
             hgt = hgt + .Rows(x).Height
            Next x
            Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt)) + "
Number of Rows = " + CStr(x - 1)
        End With
        'more code

The table can have a variable number of rows, and what I am trying to
acheive is to advise a user if what they are trying to print is not going to
fit on a single page. The page size is not standard.  There is another table
on the page but its size is fixed.

Is there a way of determining the height of a table as it will appear
printed.
Many thanks,
Brett Thompson



Thu, 29 Jul 2004 11:33:57 GMT  
 Measuring height of table
Brett,

This seems almost too slimy, but: Howbout copying the table to a new
document (with the same page size, margins and header/footer specs
and also containing a dummy table of the same height as the fixed
table), checking the page length of the new doc to see if it's more
than 1, then closing that doc without saving and advising the user
based on the results.

Another odd but probably effective way I can see would be to take the
wdVerticalPositionRelativeToPage property of each row, subtract each
row's position from that of the next row, and add up all the differences.
You'd have to temporarily set the page height to a custom (and enormous)
size to avoid having to compare the vertical positions of pairs or rows
that spanned a page break if the table ran over a page, then set it back
when done.  And this presumes your table would never run over the maximum
allowable custom page height, which in Word 97 is 22 inches, oops, I mean
55.88 cm.

Or, if the table is never going to be more than *two* pages, you could
loop through each row checking its wdVerticalPositionRelativeToPage
property and just exit the loop with a messagebox if, for any row, that
property is less than that of the prior row.


-- See the MVP FAQ at http://www.mvps.org/word --------------------------
----------------- "Life is nothing if you're not obsessed." --John Waters
-------------------------------------------------------------------------
Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.

Quote:

> Hello to all.
> I am trying to measure the height of a table as it will print.  Everything I
> try returns the value as of the minimum height of each row, so that no
> matter how many lines of text is found within a cell (and therefore how much
> space will be taken up on the printed page) the same minimum height is
> returned.  The code I'm using is as follows:

> Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
>     'the table has previously been bookmarked.
>     If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
>         ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
>         Set MedList = Selection.Tables(1)
>         hgt = 0
>         With MedList
>             .Rows.HeightRule = wdRowHeightAtLeast     'this has been
> inserted as the default property for the table in question is

> 'wdRowHeightAuto.  If left at this the height returned is almost infinite.

> 'Using wdRowHeightExactly returns the same value as

> 'wdRowHeightAtLeast  but makes invisible some of the table's text.
>             NoOfRows = .Rows.Count
>             For x = 1 To NoOfRows
>              hgt = hgt + .Rows(x).Height
>             Next x
>             Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt)) + "
> Number of Rows = " + CStr(x - 1)
>         End With
>         'more code

> The table can have a variable number of rows, and what I am trying to
> acheive is to advise a user if what they are trying to print is not going to
> fit on a single page. The page size is not standard.  There is another table
> on the page but its size is fixed.

> Is there a way of determining the height of a table as it will appear
> printed.
> Many thanks,
> Brett Thompson



Thu, 29 Jul 2004 12:48:27 GMT  
 Measuring height of table
Many thanks Mark for your input.  I'll give your workarounds a run and see
what comes out.

Seems such a simple thing, the height of a table, and it comes out complex.
Now I understand that what I was trying to do is not directly possible I'll
look more laterally.  Strange that the actual height of a table cannot be
measured!

I had been leaving a space for a signature underneath the table in the body
of the document, but I could make this part of the footer, and as you
suggest, any row that would extend beyond the first page would show up
directly on the second.

What is being printed is a medical prescription, and other than the space
for the signature, any additional space is supposed to be filled with "white
noise".  This had been part of the template I had used, pushed off the
bottom of the page by the growing table and only the first page printed, but
it could be added at time of printing with code, which would also make
things easier - just count how many pages in the document before adding the
"white noise"!  The only complicating factor is that the document has two
sections with different margins - not sure how this will mess with the page
counting.

Quote:
> Brett,

> This seems almost too slimy, but: Howbout copying the table to a new
> document (with the same page size, margins and header/footer specs
> and also containing a dummy table of the same height as the fixed
> table), checking the page length of the new doc to see if it's more
> than 1, then closing that doc without saving and advising the user
> based on the results.

> Another odd but probably effective way I can see would be to take the
> wdVerticalPositionRelativeToPage property of each row, subtract each
> row's position from that of the next row, and add up all the differences.
> You'd have to temporarily set the page height to a custom (and enormous)
> size to avoid having to compare the vertical positions of pairs or rows
> that spanned a page break if the table ran over a page, then set it back
> when done.  And this presumes your table would never run over the maximum
> allowable custom page height, which in Word 97 is 22 inches, oops, I mean
> 55.88 cm.

> Or, if the table is never going to be more than *two* pages, you could
> loop through each row checking its wdVerticalPositionRelativeToPage
> property and just exit the loop with a messagebox if, for any row, that
> property is less than that of the prior row.


> -- See the MVP FAQ at http://www.mvps.org/word --------------------------
> ----------------- "Life is nothing if you're not obsessed." --John Waters
> -------------------------------------------------------------------------
> Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.


> > Hello to all.
> > I am trying to measure the height of a table as it will print.
Everything I
> > try returns the value as of the minimum height of each row, so that no
> > matter how many lines of text is found within a cell (and therefore how
much
> > space will be taken up on the printed page) the same minimum height is
> > returned.  The code I'm using is as follows:

> > Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
> >     'the table has previously been bookmarked.
> >     If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
> >         ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
> >         Set MedList = Selection.Tables(1)
> >         hgt = 0
> >         With MedList
> >             .Rows.HeightRule = wdRowHeightAtLeast     'this has been
> > inserted as the default property for the table in question is

> > 'wdRowHeightAuto.  If left at this the height returned is almost
infinite.

> > 'Using wdRowHeightExactly returns the same value as

> > 'wdRowHeightAtLeast  but makes invisible some of the table's text.
> >             NoOfRows = .Rows.Count
> >             For x = 1 To NoOfRows
> >              hgt = hgt + .Rows(x).Height
> >             Next x
> >             Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt))
+ "
> > Number of Rows = " + CStr(x - 1)
> >         End With
> >         'more code

> > The table can have a variable number of rows, and what I am trying to
> > acheive is to advise a user if what they are trying to print is not
going to
> > fit on a single page. The page size is not standard.  There is another
table
> > on the page but its size is fixed.

> > Is there a way of determining the height of a table as it will appear
> > printed.
> > Many thanks,
> > Brett Thompson



Thu, 29 Jul 2004 15:13:58 GMT  
 Measuring height of table
What is the grammar for  wdVerticalPositionRelativeToPage  property of a
row?
I am using Word97 and searching for it in help brings up a blank.  Was it
introduced later?
Thanks,
Brett

Quote:
> Brett,

> This seems almost too slimy, but: Howbout copying the table to a new
> document (with the same page size, margins and header/footer specs
> and also containing a dummy table of the same height as the fixed
> table), checking the page length of the new doc to see if it's more
> than 1, then closing that doc without saving and advising the user
> based on the results.

> Another odd but probably effective way I can see would be to take the
> wdVerticalPositionRelativeToPage property of each row, subtract each
> row's position from that of the next row, and add up all the differences.
> You'd have to temporarily set the page height to a custom (and enormous)
> size to avoid having to compare the vertical positions of pairs or rows
> that spanned a page break if the table ran over a page, then set it back
> when done.  And this presumes your table would never run over the maximum
> allowable custom page height, which in Word 97 is 22 inches, oops, I mean
> 55.88 cm.

> Or, if the table is never going to be more than *two* pages, you could
> loop through each row checking its wdVerticalPositionRelativeToPage
> property and just exit the loop with a messagebox if, for any row, that
> property is less than that of the prior row.


> -- See the MVP FAQ at http://www.mvps.org/word --------------------------
> ----------------- "Life is nothing if you're not obsessed." --John Waters
> -------------------------------------------------------------------------
> Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.


> > Hello to all.
> > I am trying to measure the height of a table as it will print.
Everything I
> > try returns the value as of the minimum height of each row, so that no
> > matter how many lines of text is found within a cell (and therefore how
much
> > space will be taken up on the printed page) the same minimum height is
> > returned.  The code I'm using is as follows:

> > Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
> >     'the table has previously been bookmarked.
> >     If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
> >         ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
> >         Set MedList = Selection.Tables(1)
> >         hgt = 0
> >         With MedList
> >             .Rows.HeightRule = wdRowHeightAtLeast     'this has been
> > inserted as the default property for the table in question is

> > 'wdRowHeightAuto.  If left at this the height returned is almost
infinite.

> > 'Using wdRowHeightExactly returns the same value as

> > 'wdRowHeightAtLeast  but makes invisible some of the table's text.
> >             NoOfRows = .Rows.Count
> >             For x = 1 To NoOfRows
> >              hgt = hgt + .Rows(x).Height
> >             Next x
> >             Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt))
+ "
> > Number of Rows = " + CStr(x - 1)
> >         End With
> >         'more code

> > The table can have a variable number of rows, and what I am trying to
> > acheive is to advise a user if what they are trying to print is not
going to
> > fit on a single page. The page size is not standard.  There is another
table
> > on the page but its size is fixed.

> > Is there a way of determining the height of a table as it will appear
> > printed.
> > Many thanks,
> > Brett Thompson



Thu, 29 Jul 2004 15:22:45 GMT  
 Measuring height of table
Hi Brett

It's then text in the row you have to get the vertical position of - see:
http://www.mvps.org/word/FAQs/MacrosVBA/GetPosRelToPage.htm

Regards

Dave

| What is the grammar for  wdVerticalPositionRelativeToPage  property of a
| row?
| I am using Word97 and searching for it in help brings up a blank.  Was it
| introduced later?
| Thanks,
| Brett


| > Brett,
| >
| > This seems almost too slimy, but: Howbout copying the table to a new
| > document (with the same page size, margins and header/footer specs
| > and also containing a dummy table of the same height as the fixed
| > table), checking the page length of the new doc to see if it's more
| > than 1, then closing that doc without saving and advising the user
| > based on the results.
| >
| > Another odd but probably effective way I can see would be to take the
| > wdVerticalPositionRelativeToPage property of each row, subtract each
| > row's position from that of the next row, and add up all the differences.
| > You'd have to temporarily set the page height to a custom (and enormous)
| > size to avoid having to compare the vertical positions of pairs or rows
| > that spanned a page break if the table ran over a page, then set it back
| > when done.  And this presumes your table would never run over the maximum
| > allowable custom page height, which in Word 97 is 22 inches, oops, I mean
| > 55.88 cm.
| >
| > Or, if the table is never going to be more than *two* pages, you could
| > loop through each row checking its wdVerticalPositionRelativeToPage
| > property and just exit the loop with a messagebox if, for any row, that
| > property is less than that of the prior row.
| >

| > -- See the MVP FAQ at http://www.mvps.org/word --------------------------
| > ----------------- "Life is nothing if you're not obsessed." --John Waters
| > -------------------------------------------------------------------------
| > Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.
| >
| >

| > >
| > > Hello to all.
| > > I am trying to measure the height of a table as it will print.
| Everything I
| > > try returns the value as of the minimum height of each row, so that no
| > > matter how many lines of text is found within a cell (and therefore how
| much
| > > space will be taken up on the printed page) the same minimum height is
| > > returned.  The code I'm using is as follows:
| > >
| > > Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
| > >     'the table has previously been bookmarked.
| > >     If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
| > >         ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
| > >         Set MedList = Selection.Tables(1)
| > >         hgt = 0
| > >         With MedList
| > >             .Rows.HeightRule = wdRowHeightAtLeast     'this has been
| > > inserted as the default property for the table in question is
| > >
| > > 'wdRowHeightAuto.  If left at this the height returned is almost
| infinite.
| > >
| > > 'Using wdRowHeightExactly returns the same value as
| > >
| > > 'wdRowHeightAtLeast  but makes invisible some of the table's text.
| > >             NoOfRows = .Rows.Count
| > >             For x = 1 To NoOfRows
| > >              hgt = hgt + .Rows(x).Height
| > >             Next x
| > >             Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt))
| + "
| > > Number of Rows = " + CStr(x - 1)
| > >         End With
| > >         'more code
| > >
| > > The table can have a variable number of rows, and what I am trying to
| > > acheive is to advise a user if what they are trying to print is not
| going to
| > > fit on a single page. The page size is not standard.  There is another
| table
| > > on the page but its size is fixed.
| > >
| > > Is there a way of determining the height of a table as it will appear
| > > printed.
| > > Many thanks,
| > > Brett Thompson
|
|



Thu, 29 Jul 2004 16:02:11 GMT  
 Measuring height of table

Oh, sorry, it's not a property, it's a parameter of the Information property:
[range].Information(wdVerticalPositionRelativeToPage)

Mark

Quote:

> What is the grammar for  wdVerticalPositionRelativeToPage  property of a
> row?
> I am using Word97 and searching for it in help brings up a blank.  Was it
> introduced later?
> Thanks,
> Brett


> > Brett,

> > This seems almost too slimy, but: Howbout copying the table to a new
> > document (with the same page size, margins and header/footer specs
> > and also containing a dummy table of the same height as the fixed
> > table), checking the page length of the new doc to see if it's more
> > than 1, then closing that doc without saving and advising the user
> > based on the results.

> > Another odd but probably effective way I can see would be to take the
> > wdVerticalPositionRelativeToPage property of each row, subtract each
> > row's position from that of the next row, and add up all the differences.
> > You'd have to temporarily set the page height to a custom (and enormous)
> > size to avoid having to compare the vertical positions of pairs or rows
> > that spanned a page break if the table ran over a page, then set it back
> > when done.  And this presumes your table would never run over the maximum
> > allowable custom page height, which in Word 97 is 22 inches, oops, I mean
> > 55.88 cm.

> > Or, if the table is never going to be more than *two* pages, you could
> > loop through each row checking its wdVerticalPositionRelativeToPage
> > property and just exit the loop with a messagebox if, for any row, that
> > property is less than that of the prior row.


> > -- See the MVP FAQ at http://www.mvps.org/word --------------------------
> > ----------------- "Life is nothing if you're not obsessed." --John Waters
> > -------------------------------------------------------------------------
> > Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.


> > > Hello to all.
> > > I am trying to measure the height of a table as it will print.
> Everything I
> > > try returns the value as of the minimum height of each row, so that no
> > > matter how many lines of text is found within a cell (and therefore how
> much
> > > space will be taken up on the printed page) the same minimum height is
> > > returned.  The code I'm using is as follows:

> > > Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
> > >     'the table has previously been bookmarked.
> > >     If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
> > >         ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
> > >         Set MedList = Selection.Tables(1)
> > >         hgt = 0
> > >         With MedList
> > >             .Rows.HeightRule = wdRowHeightAtLeast     'this has been
> > > inserted as the default property for the table in question is

> > > 'wdRowHeightAuto.  If left at this the height returned is almost
> infinite.

> > > 'Using wdRowHeightExactly returns the same value as

> > > 'wdRowHeightAtLeast  but makes invisible some of the table's text.
> > >             NoOfRows = .Rows.Count
> > >             For x = 1 To NoOfRows
> > >              hgt = hgt + .Rows(x).Height
> > >             Next x
> > >             Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt))
> + "
> > > Number of Rows = " + CStr(x - 1)
> > >         End With
> > >         'more code

> > > The table can have a variable number of rows, and what I am trying to
> > > acheive is to advise a user if what they are trying to print is not
> going to
> > > fit on a single page. The page size is not standard.  There is another
> table
> > > on the page but its size is fixed.

> > > Is there a way of determining the height of a table as it will appear
> > > printed.
> > > Many thanks,
> > > Brett Thompson



Thu, 29 Jul 2004 16:36:10 GMT  
 Measuring height of table

You're saying the 2 sections have different *vertical* margins, so this
will affect the white noise?  Can you predict that the white noise will
always be in a given section (i.e., the second)?


-- See the MVP FAQ at http://www.mvps.org/word --------------------------
----------------- "Life is nothing if you're not obsessed." --John Waters
-------------------------------------------------------------------------
Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.

Quote:

> Many thanks Mark for your input.  I'll give your workarounds a run and see
> what comes out.

> Seems such a simple thing, the height of a table, and it comes out complex.
> Now I understand that what I was trying to do is not directly possible I'll
> look more laterally.  Strange that the actual height of a table cannot be
> measured!

> I had been leaving a space for a signature underneath the table in the body
> of the document, but I could make this part of the footer, and as you
> suggest, any row that would extend beyond the first page would show up
> directly on the second.

> What is being printed is a medical prescription, and other than the space
> for the signature, any additional space is supposed to be filled with "white
> noise".  This had been part of the template I had used, pushed off the
> bottom of the page by the growing table and only the first page printed, but
> it could be added at time of printing with code, which would also make
> things easier - just count how many pages in the document before adding the
> "white noise"!  The only complicating factor is that the document has two
> sections with different margins - not sure how this will mess with the page
> counting.


> > Brett,

> > This seems almost too slimy, but: Howbout copying the table to a new
> > document (with the same page size, margins and header/footer specs
> > and also containing a dummy table of the same height as the fixed
> > table), checking the page length of the new doc to see if it's more
> > than 1, then closing that doc without saving and advising the user
> > based on the results.

> > Another odd but probably effective way I can see would be to take the
> > wdVerticalPositionRelativeToPage property of each row, subtract each
> > row's position from that of the next row, and add up all the differences.
> > You'd have to temporarily set the page height to a custom (and enormous)
> > size to avoid having to compare the vertical positions of pairs or rows
> > that spanned a page break if the table ran over a page, then set it back
> > when done.  And this presumes your table would never run over the maximum
> > allowable custom page height, which in Word 97 is 22 inches, oops, I mean
> > 55.88 cm.

> > Or, if the table is never going to be more than *two* pages, you could
> > loop through each row checking its wdVerticalPositionRelativeToPage
> > property and just exit the loop with a messagebox if, for any row, that
> > property is less than that of the prior row.


> > -- See the MVP FAQ at http://www.mvps.org/word --------------------------
> > ----------------- "Life is nothing if you're not obsessed." --John Waters
> > -------------------------------------------------------------------------
> > Reply to group ONLY. Do not attach files. MVPs do not work for Microsoft.


> > > Hello to all.
> > > I am trying to measure the height of a table as it will print.
> Everything I
> > > try returns the value as of the minimum height of each row, so that no
> > > matter how many lines of text is found within a cell (and therefore how
> much
> > > space will be taken up on the printed page) the same minimum height is
> > > returned.  The code I'm using is as follows:

> > > Dim MedList As Table, hgt As Single, NoOfRows As Integer, x As Integer
> > >     'the table has previously been bookmarked.
> > >     If ActiveDocument.Bookmarks.Exists("MedicationList") = True Then
> > >         ActiveDocument.GoTo What:=wdGoToBookmark, Name:="MedicationList"
> > >         Set MedList = Selection.Tables(1)
> > >         hgt = 0
> > >         With MedList
> > >             .Rows.HeightRule = wdRowHeightAtLeast     'this has been
> > > inserted as the default property for the table in question is

> > > 'wdRowHeightAuto.  If left at this the height returned is almost
> infinite.

> > > 'Using wdRowHeightExactly returns the same value as

> > > 'wdRowHeightAtLeast  but makes invisible some of the table's text.
> > >             NoOfRows = .Rows.Count
> > >             For x = 1 To NoOfRows
> > >              hgt = hgt + .Rows(x).Height
> > >             Next x
> > >             Debug.Print "Table hgt = " + CStr(PointsToCentimeters(hgt))
> + "
> > > Number of Rows = " + CStr(x - 1)
> > >         End With
> > >         'more code

> > > The table can have a variable number of rows, and what I am trying to
> > > acheive is to advise a user if what they are trying to print is not
> going to
> > > fit on a single page. The page size is not standard.  There is another
> table
> > > on the page but its size is fixed.

> > > Is there a way of determining the height of a table as it will appear
> > > printed.
> > > Many thanks,
> > > Brett Thompson



Thu, 29 Jul 2004 16:38:27 GMT  
 Measuring height of table
Hi Brett - I'm confused - I'm obviously missing something:

| The table can have a variable number of rows, and what I am trying to
| acheive is to advise a user if what they are trying to print is not going
to
| fit on a single page.

If what they are rying to print is the document then surely you simply check
for the number of pages?

Regards

Dave|



Thu, 29 Jul 2004 17:08:59 GMT  
 Measuring height of table
Dear Dave,
Sorry for the confusion and many thanks for your interest.  I neglected to
add that I had a variety of other information after the table that also had
to be included in the page, including a section of "white noise" text to
fill any blank space, as well as a space for a signature.  I had been
achieving this by having a quantity of this "white noise" text that was
pushed down (and onto the next page) by the table in question, and then
printing only the first page.  I have solved the problem basically how you
suggested - the space for the signature has been moved to the footer, and
the "white noise" is added by VBA until the first page is filled.  And as
you suggested I just count the number of pages before adding the extras.
Simple.
I still think it is strange that it is not possible to measure the height of
a table as it would print.
Regards,
Brett

Quote:
> Hi Brett - I'm confused - I'm obviously missing something:

> | The table can have a variable number of rows, and what I am trying to
> | acheive is to advise a user if what they are trying to print is not
going
> to
> | fit on a single page.

> If what they are rying to print is the document then surely you simply
check
> for the number of pages?

> Regards

> Dave|



Sat, 31 Jul 2004 18:58:11 GMT  
 Measuring height of table
| I still think it is strange that it is not possible to measure the height
of
| a table as it would print.

It's so dynamic - it's not a property of the table, (unless all rows are set
to fixed heights) - it's determined by the text within it at any given time.
Word, basically isn't a page layout program, and it treats tables, pages,
and other elements that page layout programs might treat as static objects,
as being nothing more than text containers - think of the table (or page) as
a river bank and river bottom; and the text as the water rushing by.

Regards

Dave



Sun, 01 Aug 2004 17:51:45 GMT  
 Measuring height of table
Dear Dave,
Thanks for your description.  I understand your analogy, but can't agree
100%.  A table can have varying amounts of text in each cell (and that is
the problem in measuring its height) as well as varying numbers of rows.
But at any point in time you can take a "snapshot" of the table, as you can
take a photo of a river, that then becomes "fixed", and therefore one would
think, potentially measurable.
As I mentioned, I have found a work around, which deals with the whole thing
more efficiently at the same time, so it is not a problem any longer.
Programs are man made artefacts, and I guess the fact is that the person who
was involved in writing this part of Word did not think that what I tried to
do was useful.  He is probably right, as otherways of approaching the same
problem have led to better document structure and code.

Once again, many thanks for your interest and input.
Brett.


Quote:
> | I still think it is strange that it is not possible to measure the
height
> of
> | a table as it would print.

> It's so dynamic - it's not a property of the table, (unless all rows are
set
> to fixed heights) - it's determined by the text within it at any given
time.
> Word, basically isn't a page layout program, and it treats tables, pages,
> and other elements that page layout programs might treat as static
objects,
> as being nothing more than text containers - think of the table (or page)
as
> a river bank and river bottom; and the text as the water rushing by.

> Regards

> Dave



Mon, 02 Aug 2004 08:59:45 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 

1. populate table cell and measure height

2. How to measure popup menu height?

3. How to measure popup menu height?

4. How to measure popup menu height?

5. How to measure popup menu height?

6. How to measure popup menu height?

7. How to measure popup menu height?

8. row heights of table rows added by vba

9. Width and height of a table

10. Row and table heights

11. reading table cell height

12. Determining actual row height, or setting maximum row height

 

 
Powered by phpBB® Forum Software