• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

use outlook rules to send message to network location

outlook 2007 or outlook 2010
looking to create a rule which sends a message to a mapped drive OR unc path

in the screenshot below you see what rules i can apply to a message

 screenshot
how can i achieve this?  ...what about using the "run a script" action?
what sort of script is required?  thanks for your help.
0
sknoll84
Asked:
sknoll84
  • 3
  • 3
1 Solution
 
Chris BottomleyCommented:
Run script IS the way and something like:

Chris
Sub saveMailandAttach(mai As MailItem)
Dim dosFolderPath As String
Dim intIncrement As Integer
Dim fn As String
Dim ft As String
Dim FSO As Object
Dim Subject As String
Dim del As Variant

    dosFolderPath = "c:\deleteme\"
    If Right(dosFolderPath, 1) <> "\" Then dosFolderPath = dosFolderPath & "\"
    Set FSO = CreateObject("scripting.filesystemobject")
    Subject = Left(Replace(mai.Subject, """", " "), 20) & " " & mai.ReceivedTime
    For Each del In Array("/", ":", "*", "?", "<", ">", "|")
        Subject = Replace(Subject, del, " ")
    Next
    mai.saveas dosFolderPath & Subject & ".msg", olMsg

Set FSO = Nothing
End Sub

Open in new window

0
 
sknoll84Author Commented:
is that all it takes?  is it flaky?  reliable?  do you use this....?
0
 
Chris BottomleyCommented:
Is that all it takes, yes
Is it flakey ... might be if you're receiving hundreds of emails at a time
DO I use it ... yup in many permutations deleting attachments, saving attachments as well and the like.

Chris
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
sknoll84Author Commented:
added the developer tab to my outlook 2010

what do i do next?  open visual basic?  then what?

i'm not having much success.

thanks!
0
 
Chris BottomleyCommented:
Insert a normal code module and paste the code there.

Call it from the rule.

Macro settings - enable macros

Chris
0
 
sknoll84Author Commented:
pow!  thanks for your help
0

Featured Post

Industry Leaders: 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!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now