|
请求大神帮忙为何在excel 2003 加了 wrdDoc.ActivePrinter = "Kyocera reuseable paper on NE06:"电脑会出现错误停止运作 , 谢谢删除了又没有问题 .目的只是想改变打印机
原vba 如下
Sub print_loop_Monochrome()
Dim wrdDoc As Object
lesson = Sheets("print").Cells(4, 2)
vers = Sheets("print").Cells(4, 3)
num = Sheets("print").Cells(4, 4)
r = Sheets("print").Cells(4, 5)
rpath = "C:\Users\alan\Desktop\PRINT\" & lesson & "\" & vers & "\" & num & ".DOC"
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open(rpath)
wrdDoc.ActivePrinter = "Kyocera reuseable paper on NE06:"
wrdDoc.ColorMode = Monochrome
'change printer name LPT1 = port
wrdDoc.PrintOut Copies:=r
wrdDoc.Close False
wrdApp.Quit
Call reset
End Sub
|
|