Well I think I got it working well enough. I replaced the page_break lookup gode with the following, and it works like a champ now:
'get the row numbers of each page break
Names.Add "HPBreaks", "=GET.DOCUMENT(64)", False
page_break = [HPBreaks] 'so using evaluate to fill a variant array
ReDim...
The only problem is that it is slow. I have inserted debug points and it seems that most of the time is spent in the creating of the array with the page_break values. I'll try the HPageBreaks collection that you mentioned and let you know how it goes.
So basically I have a report that is generated that is broken down into 4 or 5 headers. What I want is basically a way to manually add page breaks for 2 conditions:
*That no section starts at the end of one page and ends on the next; I want to just insert a page break before the section so it is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.