Solved

Print emails after they are sent

Posted on 2006-11-13
3
448 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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Read this checklist to learn more about the 15 things you should never include in an email signature.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now