我有300多个word文档要打印,每个word有5页,但我只想打印第4页,如何批量打印出来啊

如题所述

请你将文件名在CMD中用DIR *.DOC>AAA.txt命令全部保存到AAA.txt文件 中,再用EXCEL打开这文件,分列,删除除文件名外的所有内容,文件名放A列A1开始,执行下列VBA程序,逐一读入文件名,打开,打印第4页,关闭文件。
Sub 宏1()
Dim intLastRow, arr, intLoop
intLastRow = Cells(Rows.Count, 1).End(xlUp).Row
arr = Range("a1:b" & intLastRow)
For intLoop = 1 To UBound(arr)
Open "D:\FILE\" & arr(intLoop, 1) & ".doc" For Output As #1
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentWithMarkup, Copies:=1, Pages:="4", PageType:= _
wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
Close #1
Next
End Sub

另一个方法是花钱到打字社请人帮你逐一打印。
温馨提示:答案为网友推荐,仅供参考
相似回答
大家正在搜