Results 1 to 5 of 5
  1. #1
    5 Star Lounger Ruff_Hi's Avatar
    Join Date
    Feb 2001
    Location
    New York, New York, USA
    Posts
    768
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Current Section, Page (Word XP)

    Hi All, I need to know the current section and page number so that I can put together a complicated print range involving sections, pages, etc. More details later on why. I've searched a few posts and haven't found much. I can get the total number of sections <pre> activedocument.sections.count</pre>

    but not the current section.
    (Location Australia, then UK, but now USA. Heart, outlook, attitude, etc always Australian)
    Quote: "All Happiness is the release of internal pressure"

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Current Section, Page (Word XP)

    Selection.Information(wdActiveEndAdjustedPageNumbe r) returns the page number as it will be printed*.
    Selection.Information(wdActiveEndPageNumber) returns the "physical" page number*.
    Selection.Information(wdActiveEndSectionNumber) returns the section number.

    * I.e. if you have set page numbers to start with 4, the second page in the document will return
    Selection.Information(wdActiveEndAdjustedPageNumbe r) = 5
    Selection.Information(wdActiveEndPageNumber) = 2

  3. #3
    5 Star Lounger Ruff_Hi's Avatar
    Join Date
    Feb 2001
    Location
    New York, New York, USA
    Posts
    768
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Current Section, Page (Word XP)

    Thanks Hans. That raises the question (using your "set page numbers to start with 4") ... to print the second physical page, do I need to put in 2 or 5 in the print range box on the print dialog?
    (Location Australia, then UK, but now USA. Heart, outlook, attitude, etc always Australian)
    Quote: "All Happiness is the release of internal pressure"

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Current Section, Page (Word XP)

    The number as displayed, i.e. 5.

  5. #5
    5 Star Lounger Ruff_Hi's Avatar
    Join Date
    Feb 2001
    Location
    New York, New York, USA
    Posts
    768
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Current Section, Page (Word XP)

    Thanks Hans. As promised, I wanted these two items so that I could modify Jscher's DNP macro <post#=475636>post 475636</post#> so that I only get 1 print job.
    (Location Australia, then UK, but now USA. Heart, outlook, attitude, etc always Australian)
    Quote: "All Happiness is the release of internal pressure"

Posting Permissions

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