Solved

Print emails after they are sent

Posted on 2006-11-13
3
454 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Mailbox Overload?
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

717 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