Consulting

Results 1 to 4 of 4

Thread: Save ALL attachments

  1. #1

    Save ALL attachments

    Hi,

    I am new to this forum and VBA in general.
    What I am looking for I am sure is already here.
    I have incoming email with attachments (all file types) and I want to be able to automatically save them (and delete?) to a specific folder/s on the HD.
    I have rules in place to save the email/s to a specific folder/s in Outlook based on subject.
    I have these folders in Outlook ... Inbox\Backup\Cheri & Inbox\Backup\Tony
    And on the HD ... Email Backup\Cheri & Emai Backup\Tony
    I have found code which refers to a single attachemt type but no ALL attachments.
    Could someone point me in the right direction, and how to install thanks.

    Paul

  2. #2

  3. #3
    Thanks, I looked at that but I can't get it working.
    When I Compile (Debug Menu...) I get this message:
    Compile Error: "Variable Not Defined"
    and it highlights this:
    'Check for html mail or not:
    If myItem.BodyFormat = olFormatHTML Then
    I run it anyway and it doesn't work.
    The only things I changed were:
    From
    Const strRootFolder_c AsString = "C:\Data\Appendices\"
    to
    Const strRootFolder_c As String = "C:\Email In Backups\"

    thanks

  4. #4
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    That shouldn't cause a problem but you could try using the literal 2 instead of it - what version of Outlook are you using?
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

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