Previous Document Next Document

Object Model Reference : Classes : P : Printer : Properties : Printer.Default


Printer.Default

Property Default As Boolean

Description

Member of Printer

The Default property returns whether a specified printer is the default printer.

The Default property returns a read-only value.

VBA example

The following VBA example displays a message box containing the model name of the default printer.

Sub Test()
Dim intCounter As Integer, Prn As Printer
 For intCounter = 1 To Printers.Count
  Set Prn = Printers.Item(intCounter)
  If Prn.Default = True Then
   MsgBox "The default printer is: " & Prn.Type
  End If
 Next intCounter
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.