Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print pages/sections in Word 2000 1

Status
Not open for further replies.

adstam

Technical User
Feb 28, 2001
25
I have a template in wich I use more sections. One of the reasons is to start counting pages (page 1) on the third page (so the cover is in the same document). To print the documents created with the template I use a VB routine 'BOOKLET' to collect the pages in a booklet (example: page 16 and page 1 printed on one sheet, page 2 and page 15, etc.).

Because i'm using sections i need to use the possibility to use the section numbers in a document so i can use printranges like 'P2S3, P1S1' (print Page 2 from section 3 together with P1 from section 1). I need this because the pagenumbering used for printing is not the pagenumbering as seen in the statusbar but the pagenumbering used in the sections.

Probebly most simple way is to find out the values of Page# and Section# in a selection, but I have not found a way yet to do this in VBA.

 
Only have Word 97 but may still help you.

From MS Word help.

Information Property

Returns information about the specified selection or range. Read-only Variant.
Syntax

expression.Information(Type)

expression Required. An expression that returns a Range or Selection object.

Type Required Long. The information to return. Can be one of the following WdInformation constants:

· wdActiveEndAdjustedPageNumber Returns the number of the page that contains the active end of the specified selection or range. If you set a starting page number or make other manual adjustments, returns the adjusted page number (unlike wdActiveEndPageNumber).
· wdActiveEndPageNumber Returns the number of the page that contains the active end of the specified selection or range, counting from the beginning of the document. Any manual adjustments to page numbering are disregarded (unlike wdActiveEndAdjustedPageNumber).

· wdActiveEndSectionNumber Returns the number of the section that contains the active end of the specified selection or range.
 
:) And indeed, it was this simple. Thank you Justin!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top