请问如何使用VB中的PRINTER对象设置打印机的打印份数呢?我想用代码的方式设置打印份数。我的代码如下:
'-----------------------------------------------------------------
                If Trim(Me.txtCopies.Text) <> "" Then
                    Printer.Copies = CInt(Me.txtCopies.Text)
                Else
                    Printer.Copies = 1
                End If
                Printer.EndDoc
'-----------------------------------------------------------------
但是它提示错误号:380的错误。请各位帮忙!

解决方案 »

  1.   

    另外,我曾经用代码的方式想改变打印的方向,但也是出错!
    是否用API才能改变这些属性值呢?
    请帮忙!!
      

  2.   

    改动一下:                              If VAL(Me.txtCopies.Text) <> 0 Then
                        Printer.Copies = VAL(Me.txtCopies.Text)
                    Else
                        Printer.Copies = 1
                    End If
                    Printer.EndDoc