以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- Excel vba修改数据并保存后 怎么实现静默打印 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169518) |
-- 作者:cnsjroom -- 发布时间:2021/6/19 12:34:00 -- Excel vba修改数据并保存后 怎么实现静默打印 Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\\Report.xls") Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) Dim Rg As MSExcel.Range = Ws.Cells(1,1) Rg.Value = 12345.88 wb.save App.Visible = True app.quit 怎么静默打印呢? 打印机默认并设置好了双面打印 想在上述代码操作后就自动静默打印 不显示对应文档
|
-- 作者:有点蓝 -- 发布时间:2021/6/19 13:47:00 -- http://www.foxtable.com/webhelp/topics/2121.htm Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\\Report.xls") Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) Dim Rg As MSExcel.Range = Ws.Cells(1,1) Rg.Value = 12345.88 wb.save Ws.PrintOut app.quit |
-- 作者:cnsjroom -- 发布时间:2021/6/19 15:27:00 -- 回复:(有点蓝)http://www.foxtable.com/webhelp/to... 谢谢 PrintOut(From:=1,To:=10,Copies:=3,Preview:=True,ActivePrinter:="pdfFactory
Pro") [此贴子已经被作者于2021/6/19 15:49:16编辑过]
|