当前Sub CurrentpageP()仅打印文档的第一页。
无法找出使其打印整个文档的方法。我将页面参数更改为以下参数,但是没有运气“ 1-9999”和“ 1-2”。
请在此处链接以获取长代码-以下是本节的摘录。
Sub CurrentpageP()
With ActiveDocument.PageSetup
.FirstPageTray = 281
.OtherPagesTray = 281
End With
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
End Sub
当您将范围设置为“ wdPrintCurrentPage ”时,告诉Word仅打印当前页面。如果要打印整个文档,则需要将范围设置为“ wdPrintAllDocument ”。范围类型在此处列出:http : //msdn.microsoft.com/zh-cn/library/office/bb237956(v=office.12).aspx
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句