pages

Set the pages to print.
[read/write property] pages([out, retval] BSTR *ranges) pages([in] BSTR ranges)
This property sets the pages to print.

The property value is a comma separated list of page ranges. Each range can be:

Ranges can have an "e" or "o" suffix, which denotes printing just the even-numbered, or just the odd-numbered, pages. For example, "1-10e" indicates pages 2, 4, 6, 8, and 10.

Any number of ranges can be combined with commas: "5,1-10e,1-10o,20-22".

resetParams resets this to its default value, which is to print all pages of the PDF file.

VB:
pdf.pages = "1-10,20-21"
firstPage
lastPage
resetParams