Previous Document Next Document

Object Model Reference : Classes : S : SystemPrinters : Properties : SystemPrinters.Item


SystemPrinters.Item

Property Item(nIndex As Long) As Printer

Description

Member of SystemPrinters

The Item property returns a Printer value, which specifies one of the printers in a SystemPrinters collection.

Item is the default property of the SystemPrinters class, and its reference can be omitted when you are accessing items in a SystemPrinters collection. For example, Printers.Item(2) is the same as Printers(2) — they both reference the second printer in the collection.

The Item property returns a read-only value.

Parameter
Description
nIndex
Specifies the printer by its index number

VBA example

The following VBA example lists all installed printers.

Sub Test()
 Dim intCounter As Integer
 Dim Prn As Printer
 Dim s As String
  For intCounter = 1 To Printers.Count
   Set Prn = Printers(intCounter)
   s = s & Prn.Name & vbCr
  Next intCounter
 MsgBox "The following printers are installed on your system: " & vbCr & vbCr & s
 Set Prn = Nothing
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.