Print out every mail upon sending [with a ask MsgBox if print or n

  • Thread starter Thread starter מיכ×ל (מיקי) ×בידן®
  • Start date Start date
×

מיכ×ל (מיקי) ×בידן®

Hi,

I'm not too familiar with Outlook VBA but what I'm looking for is a simple
event macro to be fired upon each mail sent.

A ask pop-up window should ask if I want to print - or not and if the answer
is YES - the whole(!) message will be printed INCL. the TO recipients, and if
possible alse the resolved BCC recipients.

I managed to write a simple code which works fine BUT the TO, CC and BCC
recipients do not print.

Thanks in advance to everone who would be kind to present a complete
Event-Macro for my request.

This is what I wrote ( the msgboxes are for testing purposes only):
====================================
'Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'' Print message upon sendig
'On Error Resume Next
'Dim objRecipient As Recipients
MsgBox Item.objRecipient, 65588
MsgBox Item.Subject, 65588
MsgBox Item.Body, 65588
CancelPrint = MsgBox("Do you want to print the present outgoing Mail ?",
65588) vbNo
If CancelPrint Then End
Item.PrintOut
End Sub
===========
Thanks, Micky
 
Sorry for the ' ahead of some commands.
here is the code again:
=======================================
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
On Error Resume Next
Dim objRecipient As Recipients
MsgBox Item.objRecipient, 65588
MsgBox Item.Subject, 65588
MsgBox Item.Body, 65588
CancelPrint = MsgBox("Do you want to print the present outgoing Mail ?",
65588) vbNo
If CancelPrint Then End
Item.PrintOut
End Sub
========
Thanks.
 
Back
Top