Add Method (PrintRanges Collection Object)
Applies To
PrintRanges collection object.
Description
Adds a print range to the PrintRanges collection. Returns a PrintRange object that represents a consecutive run of slides to be printed.
Syntax
expression.Add(Start, End)
expression Required. An expression that returns a PrintRanges object.
Start Required Long. The first slide in the range of slides to be printed. Must be less than or equal to the value of the End argument.
End Required Long. The last slide in the range of slides to be printed. Must be less than or equal to the value of the Start argument.
Remarks
The RangeType property of the PrintOptions object must be set to ppPrintSlideRange for the ranges in the PrintRanges collection to be applied.
If you don't want to print an entire presentation, add print ranges to specify which slides you want to print. You must add one print range for each consecutive run of slides to be printed. For example, if you want to print slide 1, slides 3 through 5, and slides 8 and 9, you must add three print range objects. For more information, see the example for this method.
Use the ClearAll method to clear previously defined print ranges.
Example
This example clears any previously defined print ranges and then prints slide 1, slides 3 through 5, and slides 8 and 9 in the active presentation.
With ActivePresentation.PrintOptions
.RangeType = ppPrintSlideRange
With .Ranges
.ClearAll
.Add 1, 1
.Add 3, 5
.Add 8, 9
End With
End With
ActivePresentation.PrintOut