Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Returns a String indicating the name of the specified printer device. Read-only.
Syntax
expression.DeviceName
expression A variable that represents a Printer object.
Example
The following example displays information about all the printers available to the system.
Dim prtLoop As Printer
For Each prtLoop In Application.Printers
With prtLoop
MsgBox "Device name: " & .DeviceName & vbCr _
& "Driver name: " & .DriverName & vbCr _
& "Port: " & .Port
End With
Next prtLoop
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.