A
Art Yates
I am using VB6 to create a word XP document consisting of several tables.
The document may end up being 300+ pages.
I want two things:
1. Constant header on the first line of every page of the table
2. Add my own headers to mark the beginning of a new country (bold and a
toc entry)
Using: Selection.Information(wdActiveEndPageNumber) or
Selection.Information(wdNumberOfPagesInDocument)
does not reliability tell me when I am at the end of a page.
Often, it would tell me that the page has changed 2 to 5 table rows into the
next page.
So, I tried: points= ActiveDocument.Tables(1).Rows.DistanceBottom
and always go the answer 999999
So then I tried, LinesOnPage= ActiveDocument.Tables(1).Rows.count
assumed a certain number of LinesPerPage and created a new table on every
page.
If I adjust the LinesPerPage so that I do not have any overrun from page to
page,
I will end up with several pages with unused space at the bottom. Since this
is a fairly
big book, I would like to use most of the space.
The document may end up being 300+ pages.
I want two things:
1. Constant header on the first line of every page of the table
2. Add my own headers to mark the beginning of a new country (bold and a
toc entry)
Using: Selection.Information(wdActiveEndPageNumber) or
Selection.Information(wdNumberOfPagesInDocument)
does not reliability tell me when I am at the end of a page.
Often, it would tell me that the page has changed 2 to 5 table rows into the
next page.
So, I tried: points= ActiveDocument.Tables(1).Rows.DistanceBottom
and always go the answer 999999
So then I tried, LinesOnPage= ActiveDocument.Tables(1).Rows.count
assumed a certain number of LinesPerPage and created a new table on every
page.
If I adjust the LinesPerPage so that I do not have any overrun from page to
page,
I will end up with several pages with unused space at the bottom. Since this
is a fairly
big book, I would like to use most of the space.