Solved

Print emails after they are sent

Posted on 2006-11-13
3
449 Views
Last Modified: 2008-04-03
We are running SBS 2003 with 44 users and use Outlook 2002/2003 as our email client. The partners of the firm want a pop up window after every email is sent giving the option of printing the email. I have found a VB macro that lets you print and send (in that order) but not quite what I'm after.

I have allocated 500 points to this question due to the urgent nature. As usual they want it yesterday!!!!

Has anyone any suggestions??

Thanks

Mr Tanner
0
Comment
Question by:mrtanner87
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 17937059
Greetings, mrtanner87.

Native Outlook has no option for doing this.  This will require a macro like the one below.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code and paste it into the right-hand pane of the VB Editor window
5.  Click the diskette icon on the toolbar to save the changes
6.  Close the VB Editor
7.  Click Tools->Macro->Security
8.  Set the Security Level to Medium
9.  Close Outlook
10.  Start Outlook
11.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

This macro works by watching the Sent Items folder.  When a new item hits the folder the macro fires.  It displays a dialog-box asking if the user wants to print the message that just appeared in Sent Items.  If they select Yes, then the item is printed using the default print settings.  That is the only print option available from code.  

Dim WithEvents olkSentItems As Outlook.Items

Private Sub Application_Quit()
    Set olkSentItems = Nothing
End Sub

Private Sub Application_Startup()
    Set olkSentItems = Session.GetDefaultFolder(olFolderSentMail).Items
End Sub

Private Sub olkSentItems_ItemAdd(ByVal Item As Object)
    Dim intDays As Integer
    If Item.Class = olMail Then
        If MsgBox("Do you want to print this item?", vbYesNo + vbQuestion, "Print Sent Item") = vbYes Then
            Item.PrintOut
        End If
    End If
End Sub

Cheers!
0
 

Author Comment

by:mrtanner87
ID: 17942105
Hi BlueDevilFan,

Mate, this is perfect.. Thanks very much


Mr Tanner
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17942372
You're welcome.  Glad I was able to help out.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question