Domanda

Currently Sub CurrentpageP() is only printing the first page of the document.

Can't figure out a way of making it print the whole document. I have changed the pages parameters to the following but no luck "1-9999" and "1-2".

Link here for the long code - below is the snippet the of section.

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
È stato utile?

Soluzione

When you set the Range to "wdPrintCurrentPage", your telling Word to only print the current page. If you want to print the whole document, you need to set the Range to "wdPrintAllDocument". The Range types are listed here: http://msdn.microsoft.com/en-us/library/office/bb237956(v=office.12).aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top