Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    goto end of current page (WORD 97/2000)

    Firstly, please forgive me if I am asking a stupid question.

    Is it possible to goto the end of CURRENT page?

    I am defining a new template that needs to insert a landscaped mode page at the end of current page (i.e. leave current page content untouched). [Personally, I would not give the users landscape mode functionality but I am bound ... anyway I digress].
    Thanks.
    Robie

  2. #2
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: goto end of current page (WORD 97/2000)

    You can go to the top of the next page then back up one step. Would this do?
    Beryl M


  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: goto end of current page (WORD 97/2000)

    If you're trying to do this with code, here's one way:

    Sub GoToEndOfCurrentPage()
    Dim PageRange As Range
    Set PageRange = ActiveDocument.Bookmarks("Page").Range
    PageRange.End = PageRange.End - 1
    PageRange.Start = PageRange.End
    PageRange.Select
    Set PageRange = Nothing
    End Sub

    (this takes advantage of the predetermined bookmark "Page").
    Note that if the page ends with a page break or section break, the cursor will end up on that break.

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: goto end of current page (WORD 97/2000)

    Gary,

    Last week, there was a thread about <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=wrd&Number=107398&Searc h=true&Forum=wrd&Words=fburg&Match=Username&Search page=0&Limit=25&Old=allposts&Main=107228> print without reloading a document </A> where the poster wanted to print a single page from a document. He was willing to create separate files per page. I was thinking of using the Page bookmark, which you posted long ago for selecting or deleting a page.

    So couldn't one use the code you just posted to go thru a document page by page, copy and paste the selection to a new document, and save the file?

    Fred

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: goto end of current page (WORD 97/2000)

    Hi Fred,

    Yes I sort of recalled that thread as I was posting this. The drawback - which I think Geoff W. pointed out if I recall right - was that this would not bring along the headers or footers.

    If the requirement is just to pull out the page text only, then yes this could easily be adapted for that.

    Gary

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: goto end of current page (WORD 97/2000)

    Hi Gary,

    >If the requirement is just to pull out the page text only, then yes this could easily be adapted for that.

    Not sure what you mean by "page text". I realize the headers and footers won't come along (eg, Select All doesn't include them). But I think anything on the drawing layer and footnotes are critical. I tried the select page with your macro and it did seem to pick them up. I would think this might suffice.

    Since it wasn't my request, I won't belabor it.

    Fred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •