Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Rules and attachements

Posted on 2006-04-13
Medium Priority
Last Modified: 2010-04-08
Can I create a rule in Outlook 2003 where I can save an attachement to a network drive?  The sender and the attachment will always be the same.
Question by:etec
  • 3
  • 2
LVL 76

Expert Comment

by:David Lee
ID: 16448256
Hi etec,

With a script, yes.  Without one, no.  The script is pretty simple.  If that's an option for you, then let me know and I'll post the code and instructions for using it.


Author Comment

ID: 16448269
Yes yes please please
LVL 76

Accepted Solution

David Lee earned 2000 total points
ID: 16448456

Here it is.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on Module1
4.  Copy the code below and paste it into the right-hand pane of the VB Editor window
5.  Edit the code per the comments I included in it
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools->Macro->Security
9.  Set the Security Level to Medium
10. Create your rule and set the action to "run a script".  Pick this module as the target script.

That should do it.

Sub SaveAttachmentToFolder(Item As Outlook.MailItem)
    Dim olkAttachment As Outlook.Attachment, _
        intCounter As Integer
    For intCounter = Item.Attachments.Count To 1 Step -1
        Set olkAttachment = Item.Attachments.Item(intCounter)
        'Change the folder name and path as desired
        olkAttachment.SaveAsFile "C:\Attachments\" & olkAttachment.FileName
    Set olkAttachment = Nothing
End Sub

Author Comment

ID: 16449551
Works great!!!
How do I give you points?
I'd give you more if I could
Thanks so much!!
LVL 76

Expert Comment

by:David Lee
ID: 16449963
Glad to hear it.  You're welcome.  

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses

580 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