?
Solved

Rules to send a copy of email to a file server

Posted on 2006-06-22
6
Medium Priority
?
189 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
  • 3
4 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
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: …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

809 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