![]() |
![]() |
SystemPrinters.Item
Property Item(nIndex As Long) As Printer
Member of SystemPrinters
The Item property returns a Printer value, which specifies the printer in the collection.
The Item property is the default property and its reference can be omitted when accessing an items in the collection. For example, Printers.Item(2)
is the same as Printers(2)
they both reference the second printer in the SystemPrinters collection.
The Item property returns a read-only value.
The following code example lists the printers installed on the system:
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
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.