Link to home
Start Free TrialLog in
Avatar of Bakersville
BakersvilleFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Print duplexing in outlook via VBA command

Hi everyone

What i would like to do is,

Disable the print button (remove it if posible)
Create my own print button in outlook, however, i need it to duplex the print for me, whether it is in na open email or from the inbox view.

I have no idea where to start. I've tried and failed....

Any help would be very much appreciated.

Baker
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bakersville

ASKER

Hi blueDevileFan

Yes, thats all i need. is so that all prints are printed in duplex.  I can keep the print button on there if needs be, but would really like to change it to something like

Sub FilePrintDefault()
Duplexprint
End Sub

But everytime i run the code to duplex, outlook vba tells me code is incorrect..  But it will work in Word, Excel etc.  Just wondering how to do it in outlook.

Does this help?
What version of Outlook are you using?  Can you share the code you have now so I can see what you've tried?
I'm using Outlook 2000, 2003 and 2007,

I recorded this macro in word, but for some reason it does not like it in Outlook.
Sub testprint()
 
    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
        ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
        False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
End Sub

Open in new window

Outlook wouldn't like it because an Outlook Application object has no such method as PrintOut.  That method applies to a Word Application object.  Outlook also wouldn't undestand the constants (e.g. wdPrintAllDocument, wdPrintAllPages, etc.) in this script.