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 / May 2008

Tip: Looking for answers? Try searching our database.

Getting to the bottom of a page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lenny - 20 May 2008 15:57 GMT
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
Helmut Weber - 20 May 2008 16:14 GMT
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
Lenny - 20 May 2008 18:35 GMT
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?

> Hi Lenny,
>
[quoted text clipped - 19 lines]
>
> Vista Small Business, Office XP
Helmut Weber - 21 May 2008 16:04 GMT
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
Lenny - 21 May 2008 16:57 GMT
Helmut:  many thanks for your assistance

Lenny - "all questions are learning opportunities"

> Hi Lenny,
>
[quoted text clipped - 16 lines]
>
> Vista Small Business, Office XP
 
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.