
Signature
PS: If this is a satisfying answer to your question and you're logged in via
the Microsoft site, please click Yes to "Did this post answer the question?".
Thanks.
> I have VB program writing various paragraphs.
> On top of every new page, my program needs type something like '...Continued'
>
> How would my macro know that it has gone on to new page or can I do it some
> other way, ie. include it in template, but how?
Cooz
I have range object (inside table), that inserts paragraphs, tables so on.
I want to insert 'Continued' when my range object moves on to next page, not
necessarily when the document moves to next page.
My range object is in the middle of page and there is some static text at
the bottom of the page.
may be checking for - -
rBMRange.information(wdActiveEndPageNumber) will do, but do I have to keep
on checking after each insert. that would not work.
> Hi Sukhi,
>
[quoted text clipped - 22 lines]
> > How would my macro know that it has gone on to new page or can I do it some
> > other way, ie. include it in template, but how?
Doug Robbins - Word MVP - 21 Feb 2006 18:58 GMT
Pages in Word do not mean much as the pagination can vary depending upon the
active printer.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Cooz
> I have range object (inside table), that inserts paragraphs, tables so on.
[quoted text clipped - 39 lines]
>> > some
>> > other way, ie. include it in template, but how?
Cooz - 23 Feb 2006 08:51 GMT
Hi Sukhi,
... and if the entire range moves to the next page "Continued..." will have
to disappear, I guess. Well, this can be done.
Place a bookmark at the beginning of the range (say, "StartR").
Place a bookmark at the end of the range (say, "EndR").
Activate the header.
Insert the following field (by pressing Ctrl-F9 to insert the { } and typing
the rest):
{ IF s < e { IF { PAGE } <= e { IF s < { PAGE } "Continued..." } } }
Choose Insert | Reference > Cross-reference...
In the dialog, choose 'Bookmark' as Reference type, end choose 'Page number'
under 'Insert reference to:'
Now, replace s in the field by a cross-reference to StartR, and replace e by
a cross-reference to EndR.
Done.
"Continued..." appears on the current page whenever the 'StartR-page' comes
before the 'EndR-page' AND the current page is either the 'EndR-page' or
comes before it, AND the 'StartR-page' comes before the current page. The
last AND-phrase prevents "Continued..." to appear on pages before the
'StartR-page'.
Thanks to a few nightly hours in which sleep wouldn't come. :-)
Success,
Cooz
--
PS: If this is a satisfying answer to your question and you're logged in via
the Microsoft site, please click Yes to "Did this post answer the question?".
Thanks.
> Cooz
> I have range object (inside table), that inserts paragraphs, tables so on.
[quoted text clipped - 34 lines]
> > > How would my macro know that it has gone on to new page or can I do it some
> > > other way, ie. include it in template, but how?