VBA problem in Word

  • Thread starter Pitaridis Aristotelis
  • Start date
P

Pitaridis Aristotelis

Hi,

Can someone help me to write a vba script which will print the document
using the following logic:

For example I have a document which consists of 10 pages. I want to print
the pages 10, 8, 6, 4, 2 and the script will wait using an msgbox. After
that I will put the pages again in the printer upside down and when I will
press the ok button of the msgbox, the script will print the pages 1, 3, 5,
7, 9. This script will save me time because I manually change the order of
the pages after the print of the first side of the pages.

Thanks

Aristotelis
 
A

Art H

To get started, setup to record a macro then manipulate the print
options to print in reservse and print just the odd pages. I'm sure
that you can then modify the results to get just what you need.

Art
 
P

Pitaridis Aristotelis

I made the following code:

Sub Test()
Options.PrintReverse = True
ActivePrinter = "\\SERVER\Generic 16BW-4"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1, Pages:="", _
PageType:=wdPrintEvenPagesOnly,
ManualDuplexPrint:=False, Collate:=True, Background:=True, _
PrintToFile:=False, PrintZoomColumn:=0,
PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

MsgBox "Reverse the pages"

Options.PrintReverse = False
ActivePrinter = "\\SERVER\Generic 16BW-4"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1, Pages:="", _
PageType:=wdPrintOddPagesOnly,
ManualDuplexPrint:=False, Collate:=True, Background:=True, _
PrintToFile:=False, PrintZoomColumn:=0,
PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub

I have put the msgbox command in order to have time to reverse the pages in
order to print the other side. The problem is that the application does not
print the contents of the even pages until the the script ends.
My problem is that I must have some time to reverse the pages. How can I do
it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top