Excel服务器E立方管理平台实现批量打印
2024-03-06 14:47
一、表样


二、批量打印代码

'批量打印
Sub PrintBatch()
 
     '定义接口变量
 
    Dim obj As Object
 
    Set obj = Application.COMAddIns.Item("prjAddin.Office_Addin").Object
 
    
    For Each a In Range("客户编号") '客户编号 是一个事先定义好的 "名称"
         
         '通过接口调用PrintData
       If a.Text <> "" Then
        obj.PrintData "客户资料", "客户编号='" + a.Text + "'"
        
       End If
         
    Next
    
    '把当前模板窗体带回最前面
    obj.BringExcelToFront
    
     '释放编程接口
 
    Set obj = Nothing
    
    MsgBox "批量打印 完毕!"
 
End Sub
Copyright © 2017 沈阳凯安信通科技有限公司 All rights reserved. Power by DedeCms 辽ICP备13002452号-5