Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Rules to send a copy of email to a file server

Posted on 2006-06-22
6
Medium Priority
?
186 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
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: …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

636 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