Share via


PrintRanges.ClearAll Method

Clears all the print ranges from the PrintRanges collection. Use the Add method of the PrintRanges collection to add print ranges to the collection.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub ClearAll
'Usage
Dim instance As PrintRanges

instance.ClearAll()
void ClearAll()

Examples

This example clears any previously defined print ranges in the active presentation; creates new print ranges that contain slide 1, slides 3 through 5, and slides 8 and 9; prints the newly defined slide ranges; and then clears the new print ranges.

With ActivePresentation.PrintOptions

    .RangeType = ppPrintSlideRange

    With .Ranges

        .ClearAll.Add 1, 1

        .Add 3, 5

        .Add 8, 9

        .Parent.Parent.PrintOut

        .ClearAllEnd With

End With

See Also

Reference

PrintRanges Interface

PrintRanges Members

Microsoft.Office.Interop.PowerPoint Namespace