duplex printing in vba

A

Addy

I have looked at some posts on this website and it appears that you can only
use specialised printing such as duplex, staple, holepunch etc via numerous
printer drivers rather than vba - please could anyone inform me if I am
correct in this assumption or not

Many thanks

Adelaide
 
J

Jonathan West

Addy said:
I have looked at some posts on this website and it appears that you can
only
use specialised printing such as duplex, staple, holepunch etc via
numerous
printer drivers rather than vba - please could anyone inform me if I am
correct in this assumption or not


Duplex can be done via VBA. Take a look 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

Selecting the appropriate input paper tray can be done via VBA.

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

Controlling the Printer from Word VBA
Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=132

But I'm not aware of equivalent means to select output paper tray or staple
options. You would need to try and contact the printer manufacturer to see
if these can be programmatically controlled and if there is a published
interface for this.

Unfortunately, I have never heard of a case where such an enquiry has proved
successful

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
A

Addy

Many thanks but I've already looked at this website and the macro didn't seem
to work. Not sure if I did it right or not but this is how my macros looks:-


Private Sub CBOXDUPLEXCANON_Click()
Dim iDuplex As Long

If CBOXDUPLEXCANON.Value = True Then

ActivePrinter = "\\rother\CanonMF13"



iDuplex = GetDuplex 'save the current setting
SetDuplex = 3 'set for vertical binding
ActiveDocument.PrintOut Background:=False






ActivePrinter = "\\rother\lex1340"
Else
ActivePrinter = "\\rother\lex1435"


End If

End Sub
 
J

Jonathan West

Addy said:
The printer driver is installed in printers & faxes in start is that what
you
mean?

No. It can appear there without you having a local copy of the driver.
 
A

Addy

The printer is on a networked server. It is not a standalone if that is what
you mean. It is a Canon photocopier I am using.

Many thanks
 
J

Jonathan West

Addy said:
The printer is on a networked server. It is not a standalone if that is
what
you mean. It is a Canon photocopier I am using.

Yes, I realise it is a networked printer. For the code in my articles to
work, you need to install a local copy of the printer driver software on
your PC and associate it with the printer.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
A

Addy

I have spoken to our IT dept and when a networked driver is installed a copy
is installed locally too. Any ideas?

Many 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