A
Art Yates
I am using VB6 to create a word XP document consisting of several sections
One or more tables per section. The document may end up being 300+ pages.
This is aircraft information organized by country for active versus inactive
aircraft ,
civilian, military, ..etc
Each table has a header row such as (Reg No, Make/Model, Serial No, Owner
Name , ..etc)
using selection.Rows(1).HeadingFormat = True [thanks Jezebel]
When the country changes in my dataset, I add my own sub-header to mark the
beginning of a new country
(bold with a toc entry). To make the table user-friendly, I need to add a
country sub-header on line 2
(bold but without a toc entry) of the next page if the data for the country
spans pages.
HERE IS THE PROBLEM: finding when the page number has changed. Using
"ActiveDocument.BuiltinDocumentProperties(wdPropertyPages).Value" does not
reliability tell me when the page number has changed.
It usually identifies a page break 4 to 6 lines into the next page. I need a
vba expression that tells me when I am at the beginning of a new page.
One or more tables per section. The document may end up being 300+ pages.
This is aircraft information organized by country for active versus inactive
aircraft ,
civilian, military, ..etc
Each table has a header row such as (Reg No, Make/Model, Serial No, Owner
Name , ..etc)
using selection.Rows(1).HeadingFormat = True [thanks Jezebel]
When the country changes in my dataset, I add my own sub-header to mark the
beginning of a new country
(bold with a toc entry). To make the table user-friendly, I need to add a
country sub-header on line 2
(bold but without a toc entry) of the next page if the data for the country
spans pages.
HERE IS THE PROBLEM: finding when the page number has changed. Using
"ActiveDocument.BuiltinDocumentProperties(wdPropertyPages).Value" does not
reliability tell me when the page number has changed.
It usually identifies a page break 4 to 6 lines into the next page. I need a
vba expression that tells me when I am at the beginning of a new page.