這裡是填打印機,是指名稱嗎? 我現在打印機名稱是“HP Color LaserJet 4550 PCL 6” set printer="HP Color LaserJet 4550 PCL 6" 這樣如何??
Set Printer.DeviceName 這個屩性也不行, Can you help me?
Dim prn As Printer Dim IsExists as boolean For Each prn In Printers If prn.DeviceName="HP Color LaserJet 4550 PCL 6" Then IsExists=True Set Printer = prn Exit For End If Next prn
If IsExists = False Then MsgBox "没有找到所需的打印机", vbInformation End If
set printer=??? '这里填你指定的打印机。
我現在打印機名稱是“HP Color LaserJet 4550 PCL 6”
set printer="HP Color LaserJet 4550 PCL 6"
這樣如何??
這個屩性也不行,
Can you help me?
Dim prn As Printer
Dim IsExists as boolean For Each prn In Printers
If prn.DeviceName="HP Color LaserJet 4550 PCL 6" Then
IsExists=True
Set Printer = prn
Exit For
End If
Next prn
If IsExists = False Then
MsgBox "没有找到所需的打印机", vbInformation
End If