Solved

Print emails after they are sent

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
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: …

839 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