打印:报告系统打印,如Excel打印 [英] Printing: report system print like Excel print

查看:119
本文介绍了打印:报告系统打印,如Excel打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Excel中将相同文档的多个副本打印到我的佳能Lasershot LBP1120时,它将打印一页,打印机停止,说打印完成,然后再次开始,依此类推.

换句话说,它将以连续流的形式打印所有页面.我将编写一个报表系统打印功能.

我需要做什么来以相同的方式打印Excel?

When printing multiple copies of the same document in Excel to my Canon Lasershot LBP1120, it prints one page, printer stops, says printing complete, then starts again and so on.

In word it will print all pages in one continuous stream. I will write a report system print function.

What do I need to do like Excel print in the same way?

推荐答案

好,如果要在MS Word中以非连续方式打印文档,则需要像这样的功能:

OK, if you want to print documents in non-continous way in MS Word, you need function like this:

Option Explicit

Sub NonContinuosPrinting()
Dim doc As Document, iCount As Integer, sAnswer As String

On Error GoTo Err_NonContinuosPrinting

''print active document
Set doc = ActiveDocument

Err_Conversion:
''get count of copies to print
sAnswer = InputBox("Count of copies?", "Printing...", "1")
''if Cancel button was pushed, exit sub
If sAnswer = "" Then GoTo Exit_NonContinuosPrinting
''try to convert to integer value
iCount = CInt(sAnswer)
''print "step by step" as many
Do While iCount > 0
    doc.PrintOut Copies:=1
    iCount = iCount - 1
Loop

Exit_NonContinuosPrinting:
    On Error Resume Next
    Set doc = Nothing
    Exit Sub
    
Err_NonContinuosPrinting:
    Select Case Err.Number
        Case 13 ''error conversion text to integer value
            MsgBox "Input numeric value or click ''Cancel'' button!", vbExclamation, "Error"
            Resume Err_Conversion
        Case Else
            MsgBox Err.Description, vbExclamation, Err.Number
            Resume Exit_NonContinuosPrinting
    End Select
    
End Sub



如果将此宏保存在Normal模板中,则每次需要时都可以访问.但是请记住,防病毒应用程序可以向您发送如下警告消息:"normal.dot已被可疑软件更改".为防止出现此消息,您可以编写自己的插件(并安装).从现在开始,您可以在右键菜单(使用代码)或顶部菜单(使用代码或手动)中创建按钮.



If you save this macro in Normal template it would be accessible every time you need. But remember, antivirus applications can send you a warning message like this: "normal.dot was changed by suspicious software". To prevent this message you can write your own addin (and install). From now you can create button in right-click menu (in code) or top menu (in code or manually).


这篇关于打印:报告系统打印,如Excel打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆