同志们,咨询个问题。。网络打印机用vba设置纸张的时候,为什么不能设置啊
此主题相关图片如下:qq截图20170606100523.png
Dim App As New Excel.Application
App.Visible = True
Dim Wb As Excel.Workbook = App.Workbooks.Open(fl)
Dim Ws As Excel.Worksheet = Wb.Worksheets(1)
App.Visible = False
Dim ps As New Printing.PrinterSettings
ps.PrinterName = drp("打印机")
\'For Each ps1 As PaperSize In ps.PaperSizes
\' If ps1.PaperName = drp("纸张") Then
\' Ws.PageSetup.PaperSize = ps1.RawKind
\' End If
\'Next
Ws.PrintOut(ActivePrinter:=drp("打印机"))
Wb.Save()
App.Quit()