Printing 运行时错误380“;无效的属性值
我试图改变打印机的大小,但当我运行我的代码,我得到了 运行时错误380“属性值无效 这是我的密码:Printing 运行时错误380“;无效的属性值,printing,vb6,Printing,Vb6,我试图改变打印机的大小,但当我运行我的代码,我得到了 运行时错误380“属性值无效 这是我的密码: If FormIndex > 0 Then Printer.PaperSize = FormIndex Printer.Orientation = vbPRORLandscape Me.PrintForm Printer.EndDoc MsgBox "Check Printer " & Printer.DeviceName, vbIn
If FormIndex > 0 Then
Printer.PaperSize = FormIndex
Printer.Orientation = vbPRORLandscape
Me.PrintForm
Printer.EndDoc
MsgBox "Check Printer " & Printer.DeviceName, vbInformation, "Done!"
End If
请给出任何建议,我已经在另一个运行良好的应用程序上运行了相同的代码
With Printer
Printer.CurrentX = 1400
Printer.CurrentY = 500
Printer.Orientation = vbPRORLandscape
Me.PrintForm
Printer.EndDoc
MsgBox "Check Printer " & Printer.DeviceName, vbInformation, "Done!"
end with
尝试更改该值。
FormIndex
无法识别
试试这个:
Printer.PaperSize =vbPRPSLetter
您可以参考此在哪一行出现错误?您正在使用哪台打印机?此时
printer.PaperSize=FormIndex
我出现错误。FormIndex值为146。值相同,但这是MSDN VB6链接。我使用的是EPSON TM-U220,不支持printer.CurrentX=1400
和printer.CurrentY=500
以及Printer.PaperSize=FormIndex
您知道这个属性在我当前的打印机上是如何工作的吗