I've been looking for a way to do a duplex print job without a duplex
printer. I reviewed some old posts about printing odd pages and found
that most of them led to KB article 101075 or an export of the
document to Word for duplexing there. I was looking for a VBA method
for doing this, so the KB article is right out and when you export to
Word, some of the report's text boxes wind up truncated because of
some sort of sizing difficulty with word and none of your borders or
images go along with it.
SOOOOO, that being said, I endeavored to create a module to handle it
for me. I created a new toolbar for all my reports and set the 'On
Action:' value for a button on the toolbar to a function in my
module....here's the code:
Public gintStart As Integer
Public gintEnd As Integer
Function PrintAll()
If gintEnd Mod 2 = 1 Then
gintStart = gintEnd + 2
Do
gintStart = gintStart - 2
DoCmd.PrintOut acPages, gintStart, gintStart, acDraft
Loop Until gintStart = 1
Response = MsgBox("Please remove the printed pages from the " _
& "printer, place them in the feeder tray face up, and " _
& "select 'OK' below when you are ready to finish printing", , _
"Continue Print Job")
gintStart = 0
Do
gintStart = gintStart + 2
DoCmd.PrintOut acPages, gintStart, gintStart, acDraft
Loop Until gintStart = gintEnd - 1
Else:
gintStart = gintEnd + 1
Do
gintStart = gintStart - 2
DoCmd.PrintOut acPages, gintStart, gintStart, acDraft
Loop Until gintStart = 1
Response = MsgBox("Please remove the printed pages from the " _
& "printer, place them in the feeder tray face up, and " _
& "select 'OK' below when you are ready to finish printing", , _
"Continue Print Job")
gintStart = 0
Do
gintStart = gintStart + 2
DoCmd.PrintOut acPages, gintStart, gintStart, acDraft
Loop Until gintStart = gintEnd
End If
End Function
Obviously, this requires the entering variable gintEnd which can be
populated with 'gintEnd = Me.Pages' in the 'OnPage' property of the
subject report. The code works fine, but needs one tweak to make it
solid:
The report gets to the output tray face down pages 1 thru X in order
and duplexed as desired. The hitch is, if the report has an odd number
of pages the last page is left in the feeder tray and doesn't roll
through. Anybody know a way to make that last page feed through the
printer and wind up with a blank page facing up at you in the output
tray as it should be? 4 5838
Well, it's rather late at night for me, and I've not checked the code in any
detail, but my first thought is:
if (gintEnd MOD 2 = 0) then gintEnd = gintEnd +1
HTH
Rob
"Jamey Shuemaker" <ca*********@yahoo.com> wrote in message
news:42**************************@posting.google.c om... I've been looking for a way to do a duplex print job without a duplex printer. I reviewed some old posts about printing odd pages and found that most of them led to KB article 101075 or an export of the document to Word for duplexing there. I was looking for a VBA method for doing this, so the KB article is right out and when you export to Word, some of the report's text boxes wind up truncated because of some sort of sizing difficulty with word and none of your borders or images go along with it.
SOOOOO, that being said, I endeavored to create a module to handle it for me. I created a new toolbar for all my reports and set the 'On Action:' value for a button on the toolbar to a function in my module....here's the code:
Public gintStart As Integer Public gintEnd As Integer
Function PrintAll()
If gintEnd Mod 2 = 1 Then
gintStart = gintEnd + 2 Do gintStart = gintStart - 2 DoCmd.PrintOut acPages, gintStart, gintStart, acDraft Loop Until gintStart = 1
Response = MsgBox("Please remove the printed pages from the " _ & "printer, place them in the feeder tray face up, and " _ & "select 'OK' below when you are ready to finish printing", , _ "Continue Print Job")
gintStart = 0 Do gintStart = gintStart + 2 DoCmd.PrintOut acPages, gintStart, gintStart, acDraft Loop Until gintStart = gintEnd - 1
Else: gintStart = gintEnd + 1 Do gintStart = gintStart - 2 DoCmd.PrintOut acPages, gintStart, gintStart, acDraft Loop Until gintStart = 1
Response = MsgBox("Please remove the printed pages from the " _ & "printer, place them in the feeder tray face up, and " _ & "select 'OK' below when you are ready to finish printing", , _ "Continue Print Job")
gintStart = 0 Do gintStart = gintStart + 2 DoCmd.PrintOut acPages, gintStart, gintStart, acDraft Loop Until gintStart = gintEnd End If
End Function
Obviously, this requires the entering variable gintEnd which can be populated with 'gintEnd = Me.Pages' in the 'OnPage' property of the subject report. The code works fine, but needs one tweak to make it solid:
The report gets to the output tray face down pages 1 thru X in order and duplexed as desired. The hitch is, if the report has an odd number of pages the last page is left in the feeder tray and doesn't roll through. Anybody know a way to make that last page feed through the printer and wind up with a blank page facing up at you in the output tray as it should be?
thanks for the help, BUT...it wasn't a mod problem. the scripts work
fine and achieve the desired result of duplexing odd and even pages,
i'm just looking for a way to feed a blank page to get the last odd
page out of the feeder tray and into the output tray. ca*********@yahoo.com (Jamey Shuemaker) wrote in
news:42**************************@posting.google.c om: thanks for the help, BUT...it wasn't a mod problem. the scripts work fine and achieve the desired result of duplexing odd and even pages, i'm just looking for a way to feed a blank page to get the last odd page out of the feeder tray and into the output tray.
The mod is used to determine if you need to send an extra page
eject, in order to get the last page out.
Bob Quintal.
i tried that already. if you have a 7 page report sending the command:
DoCmd.PrintOut acPages, 7, 8, acDraft
will still only run one page through because access only recognizes
the need to print to the end of the document....i think. i'm just
looking for a page feed command.
Bob Quintal <bq******@generation.net> wrote in message news:<Xn**********************@66.150.105.50>... ca*********@yahoo.com (Jamey Shuemaker) wrote in news:42**************************@posting.google.c om:
thanks for the help, BUT...it wasn't a mod problem. the scripts work fine and achieve the desired result of duplexing odd and even pages, i'm just looking for a way to feed a blank page to get the last odd page out of the feeder tray and into the output tray.
The mod is used to determine if you need to send an extra page eject, in order to get the last page out.
Bob Quintal. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg M. Silverman |
last post by:
We just converted several of our major front-ends from Access 97 to
Access 2002. However there is an undesirable feature that we hadn't
anticipated in testing: the fact that changes to...
|
by: John |
last post by:
Hi,
I've recently upgraded from Access 97 to Access 2002 & the performance
basically stinks. I have tried the following items listed below but it
has only had a minor impact:
1) Upgraded Jet...
|
by: jdph40 |
last post by:
I have a table with fields EmpID (PK), EmployeeNumber, DateTaken, and
YearTaken to track the dates an employee takes for vacation. I need a
way to distinguish between years because the data will...
|
by: Mibbetson |
last post by:
I am having trouble with Access 2002 randomly printing reports with
all the information smashed up in the upper left corner of the paper.
All the info is there, it is just really small. If a user...
|
by: Lakbir Dhillon |
last post by:
We converted our databases from Access 97 to Access 2002 (only the MDB
files, not the MDW file). In addition we ported the Access application
from a Citrix NT server to a Citrix XP server.
We...
|
by: Andy Davis |
last post by:
I have a database that uses simple bar charts in Access 2002 reports. Each
time i run these reports a message box saying "Installing Microsft Graph"
appears and seems to take an age to load. Is...
|
by: Net |
last post by:
Hi,
Anyone can tell me how I can set the VB program to do duplex printing
automatically?
What I have now is:
oDoc = oWord.Documents.Open(filepath)
oDoc.PrintOut(Background:=False,...
|
by: Neil |
last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is
upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server
at the same time. We're moving to SQL Server...
|
by: sphinney |
last post by:
All,
I'm not sure how to adequately explain my problem in two sentences or less, so at the risk of providing TMI, here's the condensed verion.
I have developed an Access 2002 database file that...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |