Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

Trouble with tables (tribbles?) and page breaks.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Art Yates - 17 Apr 2006 19:06 GMT
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.
Jezebel - 17 Apr 2006 22:09 GMT
The Information() property will tell you what page you're on.

But a simpler solution is to use a StyleRef field in the header.

>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.
[quoted text clipped - 18 lines]
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.