【问题标题】:Word Vba have problem with printing a large number of filesWord Vba 打印大量文件时出现问题
【发布时间】:2019-08-01 13:16:48
【问题描述】:

如何在 vba 中告诉打印机开始打印。现在他只将文件发送到缓冲区。当我的程序发送约 8 个文件进行打印时,打印机开始工作,但它打印了 9 个文件。

Sub Start()
'
' Makro4 Makro
'
'
    With ActiveDocument.MailMerge
        .Destination = wdSendToNewDocument
        .SuppressBlankLines = True
        With .DataSource
            .FirstRecord = wdDefaultFirstRecord
            .LastRecord = wdDefaultLastRecord
        End With
        .Execute Pause:=False
    End With
    Application.Run MacroName:="PrintMailMergeAsSeparateDocuments"
End Sub
Sub PrintMailMergeAsSeparateDocuments()

Dim i As Long

With ActiveDocument

    For i = 1 To (.Sections.Count - 1) Step 13

        .PrintOut Range:=wdPrintFromTo, From:="s" & i, To:="s" & i + 3 - 1
        .PrintOut Range:=wdPrintFromTo, From:="s" & i + 3, To:="s" & i + 13 - 1

    Next i

End With

End Sub

当我有 3 个文档(为我的程序打印 6 个文件)时,它工作正常。但在办公室里,他们有大约 11 份文件要发送给客户。有时,打印机的 20 到 40 个文件可能不是一个好主意

【问题讨论】:

    标签: vba printing ms-word


    【解决方案1】:

    这不是我的 vba 代码的错。我转到 word 设置,高级,然后关闭 后台打印

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-20
      • 2019-06-17
      • 1970-01-01
      • 1970-01-01
      • 2011-09-02
      • 2020-11-21
      • 1970-01-01
      相关资源
      最近更新 更多