实现的方法有很多,这是一个修改WORD命令的代码,如果想做得更好一些,可以使用类模块,指向WORD.APPLICAITON,然后使用BEFOREPRINT事件中修改. 请参: '* +++++++++++++++++++++++++++++
'* Created By I Love You_Word!@ExcelHome 2005-8-14 6:11:34
'仅测试于System: Windows NT Word: 10.0 Language: 2052
'^The Code CopyIn [ThisDocument-ThisDocument]^'
'* -----------------------------Option Explicit
Sub FilePrintDefault()
Dim FileNameA As String, FileNameB As String
With ActiveDocument
If .Name = FileNameA Then
Application.ActivePrinter = "AGFA-AccuSet v52.3 on LPT1:"
ElseIf .Name = FileNameB Then
Application.ActivePrinter = "Tencent Virtual Printer on LPT3:"
Else
End If
.PrintOut
End With
End Sub
'---------------------- |