+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    09-26-2009
    Location
    ontario canada
    MS-Off Ver
    Excel 2003
    Posts
    64

    Automatically saving file to shared file outside of outlook

    I recieve a report by email every day. Currently, I open the email and click on File-Save Attachments and then select the shared folder where I want to store the information (I am prompted to replace the existing document to which I answer yes). Is there a way to automate this process.
    Last edited by pdmkh; 11-20-2009 at 10:36 AM.

  2. #2
    Forum Guru mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    2,815

    Re: Automatically saving file to shared file outside of outlook

    Try this.

    Add this core to ThisOutlookSession in the VBA editor (Alt F11) (amend as necessary)

    Code:
    Sub MySave(MyItem As MailItem)
    Dim MyAttachment As Attachment
    For Each MyAttachment In MyItem.Attachments
        MyAttachment.SaveAsFile ("C:\temp\" & MyAttachment.FileName)
    Next MyAttachment
    End Sub
    Set up a rule in Outlook which identifies the messages (sender, title, attachments etc.

    Get the rule to run the above script as the action.
    Martin

    Eighty Twenty Spreadsheet Automation http://homepage.ntlworld.com/martin.rice1/ for all your Excel customisation and consulting needs.

    If my solution has saved you time and/or money, please consider donating to Cancer Research UK.

  3. #3
    Registered User
    Join Date
    08-27-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Automatically saving file to shared file outside of outlook

    Quote Originally Posted by mrice View Post
    Try this.

    Add this core to ThisOutlookSession in the VBA editor (Alt F11) (amend as necessary)

    Code:
    Sub MySave(MyItem As MailItem)
    Dim MyAttachment As Attachment
    For Each MyAttachment In MyItem.Attachments
        MyAttachment.SaveAsFile ("C:\temp\" & MyAttachment.FileName)
    Next MyAttachment
    End Sub
    Set up a rule in Outlook which identifies the messages (sender, title, attachments etc.

    Get the rule to run the above script as the action.
    I tried, but not working, rule setting is proper but files not atransfered to C:\temp\ please help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0