?
Solved

Rules to send a copy of email to a file server

Posted on 2006-06-22
6
Medium Priority
?
185 Views
Last Modified: 2011-09-20
I have users asking if its possible to have a rule or macro created that, when applied, is able to send a copy of a received or sent message to a file on a file server and pigeon hole according to what the subjuect line is or who its from. I am happy that several rules could be applied i just need to know how to get a copy of the email message on to a file server as an outlook item.

The users are on outlook 2003 Exchange 2003 and using XP pro sp1 with Novell Client for Windows 4.91 SP2

cheers

Pete
0
Comment
Question by:madpete8
[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
  • 3
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 16958495
Greetings, madpete8.

It's definitely possible with a macro.  Saving the entire item to a file is going to trigger Outlook's built-in security which will generate a pop-up dialog-box warning that a program is accessing your mailbox and asking you for permission to continue.  If that's not a problem, then this is easy.  However, if you want this to be completely automatic, then that is a problem.  There are three workarounds for this.  One, sign the code with a digital certificate.  Two, write the code as an Outlook add-in.  They have different security rules, but are more complicated to create.  Three, use a third-party tool to circumvent Outlook security.  The two that come to mind are Click-Yes, an application that sits in your system tray and clicks "Yes" on the security dialog when it appears, and Outlook Redemption, a component object (DLL) that avoids the issue altogether.  The former is free, the latter is not.

Cheers!
0
 

Author Comment

by:madpete8
ID: 16958627
Not fussed about the automation. so long as the files can be saved outside of outlook. How easy is it?

Pete
0
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 16959234
madpete8,

It's very easy.  Something like this:

Private WithEvents olkInboxItems As Items

Private Sub Application_Startup()
    Set olkInboxItems = Session.GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub Application_Quit()
    Set olkInboxItems = Nothing
End Sub

Private Sub olkInboxItems_ItemAdd(ByVal Item As Object)
    Dim olkItems As Items, _
        olkItem As Object, _
        olkMailItem As MailItem

    Set olkItems = olkInboxItems.Restrict("[Unread] = True")
    For Each olkItem In olkItems
        If olkItem.Class = olMail Then
            Set olkMailItem = olkItem

            'Change the sender name and subject as needed
            If (olkMailItem.SenderName) = "John Doe" And (olkMailItem.Subject = "Subject A") Then
                'Change the path, filename, and save as type
                'For type you can choose between olHTML, olMSG, olRTF and olTXT
                olkMailItem.SaveAs "\\Server\Share\Some Folder\Filename", olHTML
            End If

            'Change the sender name and subject as needed
            If (olkMailItem.SenderName) = "Joe Blow" And (olkMailItem.Subject = "Subject X") Then
                'Change the path, filename, and save as type
                'For type you can choose between olHTML, olMSG, olRTF and olTXT
                olkMailItem.SaveAs "\\Server\Share\Some Folder\Filename", olHTML
            End If

            'Change the sender name and subject as needed
            If (olkMailItem.SenderName) = "Jane Smith" And (olkMailItem.Subject = "Project 27") Then
                'Change the path, filename, and save as type
                'For type you can choose between olHTML, olMSG, olRTF and olTXT
                olkMailItem.SaveAs "\\Server\Share\Some Folder\Filename", olHTML
            End If
        End If
    Next
End Sub
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17065948
Hi, madpete8.

Any progress?
0

Featured Post

Technology Partners: 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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

771 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