Help!

Print out every mail upon sending [with a ask MsgBox if pr..

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA RSS
Next:  Can you use form fields in body of Outlook messag..  
Author Message
user
External


Since: Feb 20, 2009
Posts: 2



PostPosted: Fri Feb 20, 2009 10:53 am    Post subject: Print out every mail upon sending [with a ask MsgBox if print or n
Archived from groups: microsoft>public>outlook>program_vba (more info?)

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
Back to top
user
External


Since: Feb 20, 2009
Posts: 2



PostPosted: Fri Feb 20, 2009 11:15 am    Post subject: RE: Print out every mail upon sending [with a ask MsgBox if print or n [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.


"מיכאל (מיקי) אבידן®" wrote:

> 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
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum