我尝试更改打印机尺寸,但是当我运行代码时,我得到了
运行时错误380“无效的属性值
这是我的代码:
If FormIndex > 0 Then
Printer.PaperSize = FormIndex
Printer.Orientation = vbPRORLandscape
Me.PrintForm
Printer.EndDoc
MsgBox "Check Printer " & Printer.DeviceName, vbInformation, "Done!"
End If
请建议我在另一个正常运行的应用程序上运行相同的代码
答案 0 :(得分:1)
答案 1 :(得分:0)
试试这个并告诉我
With Printer
Printer.CurrentX = 1400
Printer.CurrentY = 500
Printer.Orientation = vbPRORLandscape
Me.PrintForm
Printer.EndDoc
MsgBox "Check Printer " & Printer.DeviceName, vbInformation, "Done!"
end with