Printing API - for setting Staple features

T

Tony Strazzeri

I would appreciate any help with this.

I am trying to determine and set a printer's staple feature.

So far I have determined that this can be maipulated through the
DeviceCapabilities API. I have seen lots of examples using this API
to retrieve a printer's available paper sizes and bins as well as lots
of other features such as duplex. My problem is that I have not found
one that addresses the _staple feature.

I have tried playing around with different settings but the correct
method eludes me.

Does anyone have a specific example?

I am attempting to set this for a Xeroxs Document Centre 506 printer.
I do not actually have the printer connected by have loaded the print
driver for it and set that as the default printer.

I have used this and other API successfully in the past but this
eludes me.
Many of the features appear in the DEVMODE structure and I can
understand (at least get it to work <g>)some of these. However
stapling is a new feature in Windows 2000 and XP. This new feature
appears to be accessed using using a variation (extension) of devmode.

Cheers
TonyS
 
T

Tony Strazzeri

Repost to wider audience.
Sorry. When I posted originally Word.VBA.General was the only NG I could get at.


Cheers
TonyS.
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

See the following article by fellow MVP Jonathon West

Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
T

Tony Strazzeri

Doug thanks for your reply. I have already looked at that example and have succesfully used it. However, I must be dense because I can't extrapolate from that how to make it work for the staple feature

The difference seems to be that the duplex and quality orioerties (as demonstrated in Jonathan West's example ) are accessible through the DEVMODE structure. Staple appears to have been added later and is not accessible through DEVMODE

I can see how "SetPrinterProperty DM_DUPLEX, iDuplex" works.
If staple was part of the structure I imagine it would be " SetPrinterProperty DM_STAPLE, somevalue"
where DC_STAPLE =3

But that does not work

Cheer
TonyS

Thanks
 

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