共用方式為


PrintOptions.Ranges Property

Returns the PrintRanges object, which represents the ranges of slides in the presentation to be printed. Read-only.

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

Syntax

'Declaration
ReadOnly Property Ranges As PrintRanges
    Get
'Usage
Dim instance As PrintOptions
Dim value As PrintRanges

value = instance.Ranges
PrintRanges Ranges { get; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.PrintRanges

Remarks

If you don't want to print an entire presentation, you must use the Add(Int32, Int32) method to create a PrintRange object for each consecutive run of slides that you want to print. For example, if you want to print slide 1, slides 3 through 5, and slides 8 and 9 in a specified presentation, you must create three PrintRange objects: one that represents slide 1, one that represents slides 3 through 5, and one that represents slides 8 and 9.

The RangeType property must be set to ppPrintSlideRange for the ranges in the PrintRanges collection to be applied.

To clear all the existing print ranges from the PrintRanges collection, use the ClearAll() method.

Specifying a value for the To and From arguments of the PrintOut(Int32, Int32, String, Int32, MsoTriState) method sets the contents of the PrintRanges object.

See Also

Reference

PrintOptions Interface

PrintOptions Members

Microsoft.Office.Interop.PowerPoint Namespace