Printing Question

  • Thread starter Thread starter webstuck
  • Start date Start date
W

webstuck

Hi,

I can use:

Outlook.ActiveInspector.CommandBars("File").Controls("Print...").Execute

to open the print dialog, but would like to automate clicking the "OK"
button so that it will print automatically. If there isn't a way to do
that then is there a way to automate clicking the print toolbar button,
which prints without bringing up the print dialog box?

Thanks!
Ben Cunningham
 
Try this macro:

Sub RunPrintCommand()
Dim objCBB As Office.CommandBarButton

Set objCBB = ActiveInspector.CommandBars.FindControl(, 2521)
objCBB.Execute
End Sub
 
Have you tried using ActiveInspector.CurrentItem.PrintOut?--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top