Link to home
Start Free TrialLog in
Avatar of Steven
StevenFlag for United States of America

asked on

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

 User generated image
how can i achieve this?  ...what about using the "run a script" action?
what sort of script is required?  thanks for your help.
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

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

Avatar of Steven

ASKER

is that all it takes?  is it flaky?  reliable?  do you use this....?
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
Avatar of Steven

ASKER

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!
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steven

ASKER

pow!  thanks for your help