I create protected word template forms for my company. Frequently, I have to
create a form that adds additional pages. I generally record the process
(macro) to determine what I want to happen then go in and clean up the code.
The process I use is ctrl end, ctrl enter, which gets me to the bottom of the
page and the code looks like this:
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak

If there are pages inbetween, using this jumps over pages to go to the end
of the document... first question: is this what the wdStory is telling me?

Is there a way, without a physical bookmark, to go to the bottom of any
page? Regards - Lenny

Re: Getting to the bottom of a page by Helmut

Helmut
Tue May 20 08:14:22 PDT 2008

Hi Lenny,

>If there are pages inbetween, using this jumps over pages to go to the end
>of the document... first question: is this what the wdStory is telling me?

yes.

>Is there a way, without a physical bookmark, to go to the bottom of any
>page?

Sub Test441()
Selection.Bookmarks("\page").Select
Selection.MoveEnd unit:=wdCharacter, Count:=-1
Selection.Collapse Direction:=wdCollapseEnd
End Sub


--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP

Re: Getting to the bottom of a page by Lenny

Lenny
Tue May 20 10:35:06 PDT 2008

Helmut: Greetings from California, USA!
Do I assume there needs to be a paragraph mark at the bottom of the page?
Most of the forms I develop of this type are based on tables. There is
usually a table cell at the bottom of the page. Below the cell, I leave room
for a paragraph mark, which I use as a jumping off point to insert a Section
Break New Page, which gives me the next page in the series. Does your sample
code do the same?

"Helmut Weber" wrote:

> Hi Lenny,
>
> >If there are pages inbetween, using this jumps over pages to go to the end
> >of the document... first question: is this what the wdStory is telling me?
>
> yes.
>
> >Is there a way, without a physical bookmark, to go to the bottom of any
> >page?
>
> Sub Test441()
> Selection.Bookmarks("\page").Select
> Selection.MoveEnd unit:=wdCharacter, Count:=-1
> Selection.Collapse Direction:=wdCollapseEnd
> End Sub
>
>
> --
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Vista Small Business, Office XP
>

Re: Getting to the bottom of a page by Helmut

Helmut
Wed May 21 08:04:03 PDT 2008

Hi Lenny,


>Do I assume there needs to be a paragraph mark at the bottom of the page?
No, doesn't matter.

>Most of the forms I develop of this type are based on tables. There is
>usually a table cell at the bottom of the page. Below the cell, I leave room
>for a paragraph mark, which I use as a jumping off point to insert a Section
>Break New Page, which gives me the next page in the series.

If there is a paragaph mark at the end of a page,
the cursor will be placed before the paragraph mark.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP

Re: Getting to the bottom of a page by Lenny

Lenny
Wed May 21 08:57:01 PDT 2008

Helmut: many thanks for your assistance

Lenny - "all questions are learning opportunities"

"Helmut Weber" wrote:

> Hi Lenny,
>
>
> >Do I assume there needs to be a paragraph mark at the bottom of the page?
> No, doesn't matter.
>
> >Most of the forms I develop of this type are based on tables. There is
> >usually a table cell at the bottom of the page. Below the cell, I leave room
> >for a paragraph mark, which I use as a jumping off point to insert a Section
> >Break New Page, which gives me the next page in the series.
>
> If there is a paragaph mark at the end of a page,
> the cursor will be placed before the paragraph mark.
>
> --
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Vista Small Business, Office XP
>