Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

VBA problem in Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pitaridis Aristotelis - 23 Jan 2007 17:58 GMT
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
Art H - 24 Jan 2007 13:33 GMT
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

On Jan 23, 12:58 pm, "Pitaridis Aristotelis" <pitari...@hotmail.com>
wrote:
> Hi,
>
[quoted text clipped - 11 lines]
>
> Aristotelis
Pitaridis Aristotelis - 25 Jan 2007 08:50 GMT
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?

> 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
[quoted text clipped - 22 lines]
>>
>> Aristotelis

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.