Duplex Print macro not working on HP M4345

K

Kelw

We have several different types of printer - all HP. I have written a
macro to print duplex either left-side binding or top binding
depending on the option chosen.

I use the SetDuplex 2 or 3, and this works on all the printers except
the HP M4345. No matter which setting I use, it always comes out left-
side binding.

Has anyone else had this problem, does anyone know how to deal with
it?

Many thanks for any suggestions!
 
J

Jonathan West

Kelw said:
We have several different types of printer - all HP. I have written a
macro to print duplex either left-side binding or top binding
depending on the option chosen.

I use the SetDuplex 2 or 3, and this works on all the printers except
the HP M4345. No matter which setting I use, it always comes out left-
side binding.

Has anyone else had this problem, does anyone know how to deal with
it?

I assume you mean the SetDuplex routine from the code in my article here

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Try using a higher value than 3. Although printers are supposed to be
standardized on this, it wouldn't in the least bit surprise me if HP have
gone off on their own (again!).
 
K

Kelw

I assume you mean the SetDuplex routine from the code in my article here

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Qualityhttp://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Try using a higher value than 3. Although printers are supposed to be
standardized on this, it wouldn't in the least bit surprise me if HP have
gone off on their own (again!).

Many thanks for your suggestion. I tried putting in '4', and it
didn't duplex at all - I don't think I'll start trying all the
numbers.

When I set the printing preferences of the printer to 'flip up' or not
and use the GetPrinterSetting function, it always returns the value
'3'. I think there is another setting somewhere on this printer that
sets the direction of the duplexing.

I've decided to do a temporary 'fix', by not allowing the option if
people are printing to that model of printer.

If anyone finds out how to do it, please let me know as I'm sure
people will want to do it at some point.

Thanks
 
J

Jonathan West

Kelw said:
Many thanks for your suggestion. I tried putting in '4', and it
didn't duplex at all - I don't think I'll start trying all the
numbers.

Try setting the duplex manually to how you want it, and then use the
GetDuplex function from the article to find out what the value is. That
might be quicker than just going through the numbers in sequence.
 
K

Kelw

Try setting the duplex manually to how you want it, and then use the
GetDuplex function from the article to find out what the value is. That
might be quicker than just going through the numbers in sequence.

--
Regards
Jonathan West - Word MVPwww.intelligentdocuments.co.uk
Please reply to the newsgroup- Hide quoted text -

- Show quoted text -

I have tried that, and it always returns 3. I think there must be
another setting I need to change

Thanks
 
J

Jonathan West

I have tried that, and it always returns 3. I think there must be
another setting I need to change

It might be that you need to contact the printer manufacturer and see if
they are prepared to help. it sounds like there is some custom aspect
controlled by something other than the standard Windows API calls. Unless
they are prepared to publish the interface, you may simply be out of luck on
this. It happens sometimes.

if you get no luck with the manufacturer, you can always fall back on the
kludge of defining two separate printers both pointing to the same physical
printer, but one set to duplex and the other not. Than you simply set
ActivePrinter to the one you want.
 

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