Save all incomming and sent mails to folder on PC as .msg files

Discussion in 'Using Outlook' started by wargro, Jan 30, 2012.

  1. wargro

    wargro

    Member
    Hi there

    I am looking for a way to save all incomming emails as well as emails I send to automatically be saved into a incomming and sent folder on my harddrive.

    I know file names can be an issue if file name already exists, so I'm assuming it would be best to date and time stamp the file name.

    I found this link http://www.vbaexpress.com/kb/getarticle.php?kb_id=875 , but it seems to be once off. I want a macro that will run every time a mail is sent or received.

    Thanks in advance

    Warren
  2. Diane Poremsky

    Diane Poremsky

    Senior Member
  3. wargro

    wargro

    Member
    Hi

    Thanks for that. I don't seem to be able to get it to work though?

    Should I just create a new module and save it there?

    What do I all need to change in the script? Just the File Path?

    Thanks so much for your help so far...
  4. Diane Poremsky

    Diane Poremsky

    Senior Member
    Put it in a module or in the thisoutlooksession and change the path.

    Is any of the code red? That means there is an error in the code.

    How many accounts are in outlook? I'm not sure if it doesn't work in outlook 2010 or doesn't work with multiple accounts. I'll check with the author.
  5. wargro

    wargro

    Member
    Thanks for the response.

    Sorry, I should have said that this is for a different pc thats running 2007 Outlook.

    It seems I got the kind to run, but there is an error that comes up when I receive an email.

    -------------------------------

    Run-time error '-2147287035 (80030005)':

    You don't have appropriate permission to perform this operation.

    ---------------------------------

    And when I debug this section of the code is highlighted:

    oMail.SaveAs sPath & sName, eType

    I'm not an administrator on the person I'm trying to do this on. Is that the cause of this?

    If so, how can I work around it?

    Warren
  6. wargro

    wargro

    Member
    I got it working!! Was a permissions issue on my PC.

    Thanks for all the help, a question however... anyone want to venture into editing the code to work for sent items as well?
  7. PatP

    PatP

    Member
    I use the "Save Sent Emails To" and "Direct Replies To" features under the Options tab and it works great. I just have to remember to set them for every mass email. Unfortunately, the "From" feature under the Options tab is grayed out when using mass email - I would like to set the From address to one of our Enterprise email accounts instead of my personal account.
Similar Threads
Forum Title Date
Outlook VBA and Custom Forms Ask about a simple script about save a incoming mail as file on local PC Monday at 5:22 AM
Using Outlook Outlook 2007 Save Current View,Font,Toolbar Settings Apr 11, 2014
Using Outlook Hyperlink Saved Outlook Email to MS Access Table Feb 25, 2014
Using Outlook Outlook prompts to save attachments when no changes have been made. Feb 11, 2014
Using Outlook Save downloaded images with the email Jan 28, 2014

Share This Page

Web accelerated by IISpeed - Page Speed optimization by Google for Microsoft IIS and ASP.NET