Getting to the bottom of a page

L

Lenny

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
 
H

Helmut Weber

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
 
L

Lenny

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?
 
H

Helmut Weber

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
 
L

Lenny

Helmut: many thanks for your assistance

Lenny - "all questions are learning opportunities"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top