• Current Section, Page (Word XP)

    • This topic has 4 replies, 2 voices, and was last updated 20 years ago.
    Author
    Topic
    #419005

    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

    	activedocument.sections.count

    but not the current section.

    Viewing 0 reply threads
    Author
    Replies
    • #944750

      Selection.Information(wdActiveEndAdjustedPageNumber) 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(wdActiveEndAdjustedPageNumber) = 5
      Selection.Information(wdActiveEndPageNumber) = 2

      • #944754

        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?

        • #944759

          The number as displayed, i.e. 5.

          • #944781

            Thanks Hans. As promised, I wanted these two items so that I could modify Jscher’s DNP macro post 475636 so that I only get 1 print job.

    Viewing 0 reply threads
    Reply To: Current Section, Page (Word XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: