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 / November 2004

Tip: Looking for answers? Try searching our database.

Jonathan West re Duplex Macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tonya Marshall - 22 Nov 2004 02:22 GMT
Hi Jonathan,

I'm still fiddling with the macros. I want one for Booklet (vertical
binding) and one for Tablet (horizontal binding) printing.  I put a 3 in
one for booklet printing and a 2 (it was a guess) for Tablet printing.
They both do booklet printing.

The paper has 5 holes punched at the top for charts and both of them
print with the holes at the bottom. Standard printing prints with them
at the top.

What I need is to turn the pages 180 degrees so that they print with the
holes at the top. I thought about experimenting with putting different
numbers in the macros but since it's not my printer I don't feel quite
right about that. I don't expect that I could harm the printer but would
like to know if there's a range of numbers to try.

I can manually set the printer for vertical and horizontal binding and
turn them 180 degrees so that they print out correctly but there are no
numbers or anything to indicate what each setting is.

Thanks.

Signature

Tonya Marshall

Tonya Marshall - 22 Nov 2004 03:00 GMT
I found this site with the manuals for the printer but I'm not sure
which one might have the information I'm looking for.
http://h20000.www2.hp.com/bizsupport/TechSupport/DocumentIndex.jsp?contentType=S
upportManual&locale=en_US&docIndexId=179111&taskId=101&prodTypeId=18972&prodSeri
esId=238800

Tonya Marshall

> Hi Jonathan,
>
[quoted text clipped - 18 lines]
>
> Thanks.
Tonya Marshall - 22 Nov 2004 04:03 GMT
I downloaded the Manual for the printer and copied this out of it:

3 Flip Pages Sideways
(long-edge portrait)
This is the default and most common layout, with every
printed image oriented right-side up. Facing pages are read
from top to bottom on the left page, then from top to bottom
on the right page.

4 Flip Pages Up
(short-edge portrait)
This layout is often used with clipboards. Every other printed
image is oriented upside-down. Facing pages are read
continuously from top to bottom.

I think what I must do is change the order of the printing, which I can
do manually in the printer settings, and print the second page first
which would be the same as rotating them 180º, so I would need VBA code
to do that in the printer macro. I will try 4 in the Tablet code
tomorrow at work.

1 & 2 are for Landscape settings.

Tonya Marshall

> I found this site with the manuals for the printer but I'm not sure
> which one might have the information I'm looking for.
[quoted text clipped - 23 lines]
>>
>> Thanks.
Jonathan West - 22 Nov 2004 11:21 GMT
Hi Tonya,

>I downloaded the Manual for the printer and copied this out of it:

Exactly which version of the HP2300 are you using? Not all models have the
ability to print duplex.

> 3 Flip Pages Sideways
> (long-edge portrait)
[quoted text clipped - 16 lines]
>
> 1 & 2 are for Landscape settings.

I think I have found the point in the manual you are referring to - page 44
of the User Guide.

The numbers on the diagrams in the manual have nothing to do with the
numbers you feed into the routines.

It might be that you need to set the paper orientation in the printer
driver. I didbn't include this in the original artyicle, because Word
normally copes with this unassisted by means of setting the orientation in
the Page Setup dialog. Try adding the following code to the printing module

Public Sub SetOrientation(iOrient As Long)
  SetPrinterProperty DM_ORIENTATION, iOrient
End Sub

Public Function GetOrientation() As Long
 GetColorMode = GetPrinterProperty(DM_ORIENTATION)
End Function

You can set the orientation like this

SetOrientation 1   ' sets portrait layout
SetOrientation 2   ' sets landscape layout

Normally, setting this property is over-ridden by the Page Setup settings in
Word (which is why I didn't include it in the original article), but it
might be that in your case you need this in order to bully the printer into
getting the combination or orientation and duplex that you want.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Tonya Marshall - 22 Nov 2004 12:14 GMT
> Hi Tonya,
>
[quoted text clipped - 52 lines]
> might be that in your case you need this in order to bully the printer into
> getting the combination or orientation and duplex that you want.

Thanks Jonathan,
I'll give it a try when I get to work.

Signature

Tonya Marshall

Tonya Marshall - 23 Nov 2004 01:51 GMT
> Hi Tonya,
>
[quoted text clipped - 34 lines]
> normally copes with this unassisted by means of setting the orientation in
> the Page Setup dialog. Try adding the following code to the printing module

I have 3 modules in the Duplex template
Printer - do the 2 public subs go in here? It's the macro that starts,
Option Explicit
Booklet - Set orientation1 in here?
Tablet - Set orientation2 in here?

> Public Sub SetOrientation(iOrient As Long)
>    SetPrinterProperty DM_ORIENTATION, iOrient
> End Sub

Is this the one that turns the pages 180°?

> Public Function GetOrientation() As Long
>   GetColorMode = GetPrinterProperty(DM_ORIENTATION)
> End Function

It's not a color printer.

> You can set the orientation like this
>
> SetOrientation 1   ' sets portrait layout
I expect the above is for booklet layout?

> SetOrientation 2   ' sets landscape layout
Landscape would  turn the pages 90°, not 180°

I didn't want landscape, I wanted horizontal binding on a portrait layout

> Normally, setting this property is over-ridden by the Page Setup settings in
> Word (which is why I didn't include it in the original article), but it
> might be that in your case you need this in order to bully the printer into
> getting the combination or orientation and duplex that you want.

Signature

Tonya Marshall

Jonathan West - 23 Nov 2004 11:36 GMT
Hi Tonya,

before we go any further with this, it is possible to go into the Printer
properties dialog and set the duaplxing manually to the way you want it? If
not, then all the messing about with code will not achieve what you are
trying to do.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Tonya Marshall - 23 Nov 2004 12:33 GMT
> Hi Tonya,
>
> before we go any further with this, it is possible to go into the Printer
> properties dialog and set the duaplxing manually to the way you want it? If
> not, then all the messing about with code will not achieve what you are
> trying to do.

Yes. I think I mentioned that in my first post.
I can set it for both horizontal and vertical binding, then I can set it
to turn the pages 180 degrees if I need to. (That's what I do when I use
the paper drawer with the 5-hole punched paper so that the holes are at
the top of the page when it's printed.
Signature

Tonya Marshall

Tonya Marshall - 23 Nov 2004 15:10 GMT
Here is an image of the printer properties. Don't know if it will be
helpful or not but thought I'd stick it in:
http://img91.exs.cx/my.php?loc=img91&image=image101.jpg
Jonathan West - 23 Nov 2004 20:54 GMT
> Here is an image of the printer properties. Don't know if it will be
> helpful or not but thought I'd stick it in:
> http://img91.exs.cx/my.php?loc=img91&image=image101.jpg

That 180 degree flip is not part of the standard printer API in Windows.
That means that if you want programmatic access to that feature, you'll have
to contact HP and ask about the API. I'm not all that optimistic of your
chances of getting anywhere with them.

I suspect that the only way to handle this in code may be to define two
copies of the pronter with different names, but both pointing to the same
physcial device. Configure one as duples with the settings you want, and the
other as non-duplex. Then set the ActivePrinter property to one or the other
for the printing you want.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Tonya Marshall - 24 Nov 2004 00:27 GMT
>> Here is an image of the printer properties. Don't know if it will be
>> helpful or not but thought I'd stick it in:
[quoted text clipped - 10 lines]
> other as non-duplex. Then set the ActivePrinter property to one or the other
> for the printing you want.

Thanks, Jonathan. I appreciate the time you've spent on this. I can't
set the active printer property to something different as we get forms
printed from the AS400 and the standard print configuration is the one
they start from. I know they have control of the printer because what we
receive is printed correctly from the 5-hole punched paper drawer. Maybe
I could ask them what they do/use to make the configurations work.

Signature

Tonya Marshall

Tonya Marshall - 28 Nov 2004 12:18 GMT
>> Here is an image of the printer properties. Don't know if it will be
>> helpful or not but thought I'd stick it in:
[quoted text clipped - 10 lines]
> other as non-duplex. Then set the ActivePrinter property to one or the other
> for the printing you want.

Since that is not going to be possible, I can put  a Quick Set Tablet
and Booklet feature with pages turned 180 degrees. What would be useful
would be a macro to return the printer to the default setting so we
don't have to go in and turn the feature off. I fear most would forget
as I have from time to time.
Thanks.

Signature

Tonya Marshall

 
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.