我用下面的语句打印Form6上的标签控件内容,不能实现横向打印,请高手帮改一下,谢谢!
Form6.PrintForm
 Printer.Orientation = vbPRORLandscape

解决方案 »

  1.   

    Private Sub Command1_Click() 
        Dim BeginPage, EndPage, NumCopies, i     ' 设置“取消”为 True 
        CommonDialog1.CancelError = True     On Error GoTo ErrHandler     ' 显示“打印”对话框 
        CommonDialog1.ShowPrinter     ' 从该对话框取得选定的值 
        BeginPage = CommonDialog1.FromPage 
        EndPage = CommonDialog1.ToPage 
        NumCopies = CommonDialog1.Copies 
        Printer.Orientation = CommonDialog1.Orientation 
        '很多这样的使用 
        For i = 1 To NumCopies 
            Me.PrintForm 
        ' 此处放置将数据发送到打印机的代码 
        Next i     Exit Sub 
    ErrHandler: 
        ' 用户按了“取消”按钮 
        Exit Sub 
    End Sub 
      

  2.   

    您可以参考上的答案http://topic.csdn.net/t/20010312/10/83136.html
      

  3.   

    Private Sub Command1_Click()
        Printer.Orientation = 2   '1 纵向,2 横向
        Me.PrintForm
    End Sub