Note: The other languages of the website are Google-translated. Back to English
Einloggen  \/ 
x
or
x
Registrieren  \/ 
x

or

Wie kann ich Anhänge automatisch aus Outlook in einen bestimmten Ordner herunterladen / speichern?

Im Allgemeinen können Sie alle Anhänge einer E-Mail mit einem Klick speichern aaaZubehör > Alle Anhänge speichern in Outlook. Aber wenn Sie alle Anhänge aus allen empfangenen und empfangenen E-Mails speichern müssen, ist dies ideal? In diesem Artikel werden zwei Lösungen vorgestellt, mit denen Anhänge automatisch aus Outlook in einen bestimmten Ordner heruntergeladen werden können.


Laden Sie Outlook-Anhänge automatisch in einen Ordner mit VBA und Regel herunter

Diese Methode führt ein VBA-Skript ein und führt dieses Skript mit einer Regel aus, mit der Outlook-Anhänge automatisch heruntergeladen und in einem bestimmten Ordner gespeichert werden. Bitte gehen Sie wie folgt vor:

1. Drücken Sie Andere + F11 Tasten zum Öffnen des Fensters Microsoft Visual Basic für Applikationen.

2. Klicken Sie Insert > Modulund fügen Sie dann das folgende VBA-Skript in das neu öffnende Modulfenster ein.

VBA: Outlook-Anhänge automatisch in einem bestimmten Ordner speichern

Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\Users\DT168\Documents\outlook-attachments\"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub

Hinweis: Bitte finden Sie es heraus sSaveFolder = "C: \ Benutzer \ DT168 \ Dokumente \ Outlook-Anhänge \"und ersetzen Sie den Pfad des Zielordners nach Bedarf.

3. Speichern Sie das VBA-Skript und schließen Sie das Fenster Microsoft Visual Basic für Applikationen.

4. Geh zum E-mail anzeigen und klicken Startseite > Regeln > Regeln und Warnungen verwalten. Siehe Screenshot:

5. Klicken Sie im sich öffnenden Dialogfeld Regeln und Warnungen auf Neue Regel Taste auf der E-Mail-Regeln Tab. Siehe Screenshot:

6. Klicken Sie nun im Dialogfeld Regel-Assistent auf, um die auszuwählen Übernehmen Sie Regeln für Nachrichten, die ich erhalte Option und klicken Sie auf Weiter .

7. Deaktivieren Sie im Dialogfeld Regelassistent (welche Bedingung (en) möchten Sie überprüfen?) Alle Optionen und klicken Sie auf Weiter Taste. Und dann klicken Sie auf Ja Schaltfläche im eingeblendeten Microsoft Outlook-Dialogfeld. Siehe Screenshot:

8. Im Dialogfeld Regelassistent (was möchten Sie mit der Nachricht tun?) Gehen Sie nun wie folgt vor: (1) Prüfen Sie die Führen Sie ein Skript aus Option; (2) Klicken Sie auf den Text von ein Skript Um das Dialogfeld Skript auswählen zu öffnen, wählen Sie das in Schritt 2 hinzugefügte Skript aus und klicken Sie auf OK Taste; (3) Klicken Sie auf die Weiter .

9. Klicken Sie im Dialogfeld Regelassistent (Gibt es Ausnahmen?) Auf Weiter Taste direkt.

10. Benennen Sie nun im letzten Dialogfeld des Regelassistenten die Regel im Schritt 1 Aktivieren Sie das Kontrollkästchen Optionen nach Bedarf in der Schritt 2 Abschnitt und klicken Sie auf beenden .

11. Schließen Sie das Dialogfeld Regeln und Warnungen.

Und jetzt werden alle Anhänge von Ihrem E-Mail-Konto heruntergeladen und im angegebenen Zielordner gespeichert. Alle Anhänge eingehender E-Mails werden automatisch heruntergeladen und auch im angegebenen Ordner gespeichert.


Laden Sie Outlook-Anhänge mit Kutools for Outlook automatisch in einen Ordner herunter

Wenn Sie Kutools for Outlook installiert haben, können Sie es anwenden Automatische Trennung Option zum automatischen Herunterladen aller Outlook-Anhänge und zum einfachen Speichern in einem bestimmten Ordner.

Kutools für Outlook: Fügen Sie mehr als 100 praktische Tools für Outlook hinzu, die Sie innerhalb von 60 Tagen ohne Einschränkung testen können. WEITERLESEN      Kostenlose Testversion

1. Klicken Sie Kutools > Automatische Trennung > Ermöglichen um die Auto Detach-Funktion zu aktivieren.

2. Klicken Sie weiter Kutools > Automatische Trennung > Auto Detach Manager.

3. Aktivieren Sie im Dialogfeld "Anhänge automatisch trennen" die Option Alle empfangenen Anhänge automatisch trennen Option, und konfigurieren Sie dann wie folgt:
(1) Klicken Sie auf die Schaltfläche Durchsuchen  Angeben des Zielordners zum Speichern automatisch getrennter Anhänge;
(2) Die Überprüfung ist optional die Unterordner erstellen im folgenden Stil Option und wählen Sie dann einen Unterordnerstil aus der Dropdown-Liste aus.
(3) Die Überprüfung ist optional Die Nur Anhänge mit folgender Erweiterung abnehmen Option, und geben Sie dann die Dateierweiterungen für Anhänge in das folgende Feld ein.
(4) Die Überprüfung ist optional Das Anhangssymbol bleibt weiterhin in den E-Mails erhalten Optionen.

Hinweis: Wenn Sie Anhänge von Absendern automatisch trennen müssen, können Sie dies überprüfen Anhänge automatisch nach Regeln trennen Klicken Sie auf die Option Neu Klicken Sie auf die Schaltfläche, geben Sie die E-Mail-Adresse des Absenders ein und geben Sie im zweiten Dialogfeld "Anhänge automatisch trennen" den Zielordner an.

4. Drücke den Ok Schaltfläche, um die Einstellungen zu speichern.

Von nun an werden alle Anhänge (oder Anhänge mit angegebenen Dateierweiterungen oder Anhänge von bestimmten Absendern basierend auf Ihren Einstellungen) automatisch gespeichert.

Hinweis: Sie können Kutools für Outlooks anwenden Alle abnehmen (Anhänge) Funktion oder Rette alle Funktion (Anhänge) zum schnellen Herunterladen / Speichern aller Anhänge aus mehreren / allen empfangenen E-Mails in Outlook.


Demo: Laden Sie Outlook-Anhänge mit Kutools for Outlook automatisch in einen Ordner herunter


Tipp: In diesem Video, Kutools Registerkarte wird hinzugefügt von Kutools für Outlook. Wenn Sie es brauchen, klicken Sie bitte Kuyichi Signs Transparency Pledge. eine 60-tägige kostenlose Testversion ohne Einschränkung zu haben!


In Verbindung stehende Artikel:


Kutools für Outlook - Bringt 100 erweiterte Funktionen in Outlook und erleichtert die Arbeit erheblich!

  • Auto CC / BCC nach Regeln beim Versenden von E-Mails; Automatische Weiterleitung Mehrere E-Mails nach Kundenwunsch; Automatische Antwort ohne Exchange Server und mehr automatische Funktionen ...
  • BCC-Warnung - Nachricht anzeigen, wenn Sie versuchen, alle zu beantworten wenn Ihre E-Mail-Adresse in der BCC-Liste enthalten ist; Bei fehlenden Anhängen erinnernund weitere Erinnerungsfunktionen ...
  • Antwort (Alle) mit allen Anhängen in der E-Mail-Konversation; Viele E-Mails beantworten in Sekunden; Begrüßung automatisch hinzufügen bei der Antwort; Datum zum Betreff hinzufügen ...
  • Anhang Tools: Alle Anhänge in allen Mails verwalten, Automatische Trennung, Alle komprimieren, Alle umbenennen, Alle speichern ... Schnellbericht, Ausgewählte Mails zählen...
  • Leistungsstarke Junk-E-Mails nach Brauch; Entfernen Sie doppelte E-Mails und Kontakte... Ermöglichen Sie es Ihnen, in Outlook intelligenter, schneller und besser zu arbeiten.
Schuss Kutools Outlook Kutools Tab 1180x121
Schuss Kutools Outlook Kutools plus Tab 1180x121
 
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    JoaoAzevedo · 5 days ago
    Hi,
    The script works very well.
    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "C:\Users\DT168\Documents\outlook-attachments\"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub

    Everything works great but what if I have a number of attachments in the email and I only want to save the excel and pdf files which are attached and not all the files attached to the email?
    Does someone can help?
    Much appreciated.
    Joao
  • To post as a guest, your comment is unpublished.
    Hari · 3 months ago
    @Tom Hi Tom, I'm also facing the same problem..is that fixed for you??

  • To post as a guest, your comment is unpublished.
    GuestMas · 6 months ago
    @Brandie Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    MsgBox "E:\Dropbox\Apps\Attachments" & F
    sSaveFolder = "E:\Dropbox\Apps\" & Format(Now(), "dd.mm_hh.mm.ss")
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub
  • To post as a guest, your comment is unpublished.
    filng · 10 months ago
    @Shilpa Hi Shilpa. At colabel we are developing a no-code solution that can automatically categorize and store your attachments into folders. We're currently looking for qualified beta users willing to test our solution for free. In case you think we might help you, just send me an email at filippo@colabel.com
  • To post as a guest, your comment is unpublished.
    Shilpa · 1 years ago
    @Brandie HI All, I did all the steps but my script is not working.
  • To post as a guest, your comment is unpublished.
    Brandie · 1 years ago
    I got the script to run, everything works, but is there anyway to prevent the original email from being deleted? It is going directly into my "permanently deleted" files. I'd like the emails to stay right where they are rather than being deleted.

  • To post as a guest, your comment is unpublished.
    nilima · 1 years ago
    @cheunt2@gmail.com thank you so much! This solved my problem. Script was not running at all!
  • To post as a guest, your comment is unpublished.
    TGG · 1 years ago
    @jahangir because of security rules thisis not standard active from outlook 2013 and later.

    For outlook 2016 you need to add this to the registry:

    HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security
    DWORD: EnableUnsafeClientMailRules
    Value: 1
  • To post as a guest, your comment is unpublished.
    jahangir · 1 years ago
    i am not find "run a script" option please?
  • To post as a guest, your comment is unpublished.
    kellytte · 1 years ago
    @Sipho Hi sipho,
    If you enable the Auto Save Attachments or Auto Detach Attachments feature of Kutools for Outlook, they will save or detach attachments automatically from new incoming emails only when Outlook is running,
  • To post as a guest, your comment is unpublished.
    Joon Lin Ng · 1 years ago
    @cheunt2@gmail.com Thank you very much..
  • To post as a guest, your comment is unpublished.
    Sipho · 1 years ago
    Hi,


    Does Kutools automatically save the emails even when outlook is not opened and if not how can I do this?


    Thanks
  • To post as a guest, your comment is unpublished.
    Aftab · 1 years ago
    @cuatro2006@gmail.com HI, I need the entire timestamp in the file name to be saved as i am recieving the attachment everyhour
  • To post as a guest, your comment is unpublished.
    kellytte · 1 years ago
    @Guil Hi Guil,
    If you use the Detach All (Attachments) of Kutools for Outlook, you can specify to place the attachments into subfolders which are named as message subject-receive time.
  • To post as a guest, your comment is unpublished.
    Guil · 1 years ago
    Hi,

    How can I save this with a timestamp in the file name? The files I receive via e-mail always have the same name and the newer file overrides the previous one.

    Thanks in advance.

    Guil
  • To post as a guest, your comment is unpublished.
    Frodo · 1 years ago
    @Suz I was having the same problem, and enabling all macros fixed it for me as well.
  • To post as a guest, your comment is unpublished.
    Roberta · 2 years ago
    @kellytte Hi,
    I have retored the Run a script option in Outlook. But it still doesen't work. the message error is "This rule is not available in the current mode". Can you help me please?
  • To post as a guest, your comment is unpublished.
    Anthony · 2 years ago
    Hello, this code is running but MItem.Attachments.Count shows 0. When i try in debug mode watch this variable it reread and value shows more than 1. Help please. Why the variable didn't read in automatic mode?
  • To post as a guest, your comment is unpublished.
    kellytte · 2 years ago
    @Krishnakant Hi Krishnakant,
    In this article, I have introduced the method to restore the Run a script option in Outlook. Hope it can help you.
    https://www.extendoffice.com/documents/outlook/4640-outlook-rule-run-a-script-missing.html
  • To post as a guest, your comment is unpublished.
    Krishnakant · 2 years ago
    Hello,

    Its not showing 'run a script' action. Can you help please?


    Thanks

    Krishnakant
  • To post as a guest, your comment is unpublished.
    Katagihallimath · 2 years ago
    Is this correct?

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "D:\Adarsh\My\Payslips\" & Year(Date)Format(Date, "DD") & Format(Date, "Mmm")
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub
  • To post as a guest, your comment is unpublished.
    Tom · 2 years ago
    My Computer will only download the attachments when I run the rule manually. it doesn't automatically download the attachments when new emails arrive. Is that how it is supposed to be or could I have something set up wrong?
  • To post as a guest, your comment is unpublished.
    Katagihallimath · 2 years ago
    Hello, I tried downloading the attachments to a folder but the code doesn't seem to work.

    Kindly Help.

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "D:\Adarsh\My\Payslips\" & Year(Date)Format(Date, "DD") & Format(Date, "Mmm")
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub
  • To post as a guest, your comment is unpublished.
    Namig Heydarov · 2 years ago
    Hi all,
    I've running a command, but after restart of Outlook it stops. Do you have any idea how to solve it?
    Thanks!
  • To post as a guest, your comment is unpublished.
    James · 2 years ago
    Hi. Is it possible to save just the pdf files from the outlook attachment?
  • To post as a guest, your comment is unpublished.
    cuatro2006@gmail.com · 2 years ago
    @Scott Hi, try whith this

    Path = "\\myfolder\folder1\"
    nombre = "filename"
    fecha = Year(Date) & Format(Month(Date), "00") & Format(Day(Date) , "00")
    olItem.Attachments(1).SaveAsFile Path & nombre & fecha & ".txt"
  • To post as a guest, your comment is unpublished.
    cuatro2006@gmail.com · 2 years ago
    @Alex Hi, show me the script, maybe I can help you
  • To post as a guest, your comment is unpublished.
    Alex · 2 years ago
    I wrote the script but no files are saving to my folder. Any suggestions?
  • To post as a guest, your comment is unpublished.
    Scott · 2 years ago
    Is there a way to modify the file name to include the date (ie: Filename.Date.filetype)
  • To post as a guest, your comment is unpublished.
    cuatro2006@gmail.com · 2 years ago
    Hello!
    I need that if the attachment is empty, that the macro left does not perform any action
  • To post as a guest, your comment is unpublished.
    Martin · 2 years ago
    In option 1, where am I supposed to hit ALT + F11? I tried with Outlook opened and it isn't working. Normal ALT + F11 does nothing, and ALT Gr + F11 opens my Intel HD Graphic Control Panel.
  • To post as a guest, your comment is unpublished.
    Rob · 2 years ago
    Has anyone been able to figure out a way for this to work if the files you are saving all have the same name?


    I get a bunch of files that I need to save daily, but there are at least 2 of each with the same name.


    If anyone has any suggestions that would be greatly appreciated!!
  • To post as a guest, your comment is unpublished.
    Jasmin Nolasco · 2 years ago
    @Alfredo Funes https://www.extendoffice.com/documents/outlook/4640-outlook-rule-run-a-script-missing.html
  • To post as a guest, your comment is unpublished.
    Almira · 3 years ago
    Can I save attachments from 1 category in my email box? I don't need all of them, so I need select it. I have trial version of Kutools and in Options I have just 3 tabs: General, Detach&save and Compress. I saw on the page, that you have tab Filter. So Can I select and make settings from which category to save attachments?
  • To post as a guest, your comment is unpublished.
    Almira · 3 years ago
    @kelly.extendoffice@gmail.com Hi! Did you finish with this project? I mean do you have new version which can do 1) and 2) steps? I need save attachments from 1 category in email box, I don't need all of attachments.
  • To post as a guest, your comment is unpublished.
    Alfredo Funes · 3 years ago
    what if "Run a Script" is not available in "What do you want to do with the message" section?
  • To post as a guest, your comment is unpublished.
    Raynardo Pardo · 3 years ago
    Hello, Is there a VBA script for CSV attachment. I currently have report jobs that automatically goes into named folders in outlook I would now like for those files in the folders extract itself and go into the corresponding folders on my desktop. Hope this makes sense. Please Help! I am very new to VBA.
  • To post as a guest, your comment is unpublished.
    Dan · 3 years ago
    Hello, a few questions:

    1) This software not only saves the attachments but also the email message itself as a png file correct?
    2) This software will let us save each new email in a new subfolder if we set it up correct?
    3) This software will let us set up filters to control which emails get sent to dropbox and which ones are passed on correct?

    Thank You!
  • To post as a guest, your comment is unpublished.
    maxgiaco01@gmail.com · 3 years ago
    Hi, if you need to manage widely the attachments this solution is the best, but if you own a Dropbox account there are some email providers that automatically upload every attachment to Dropbox account. It means that you get the attachment in dropbox folder even if you hadn't read the email. I use servermx.com because they did a customization about the Dropbox path where I need to put the attachments.
  • To post as a guest, your comment is unpublished.
    faitharces29@gmail.com · 3 years ago
    Hi there,

    After having gone through all the steps it does work. The only thing is that while it saves the message as a png file, I would also like the script to actually go to the link in the message and download the data from there. Any good ideas how to extend the script?

    Thanks,

    Laszlo
  • To post as a guest, your comment is unpublished.
    Suz · 3 years ago
    @regis.saintgirons@gmail.com Hi, had a problem with it as well. For me, it were the Outlook settings under Trust Centre. All macros had been disabled. Once I enabled the macros to run on outlook, the script appeared to run and save the file.
  • To post as a guest, your comment is unpublished.
    kelly001 · 3 years ago
    @regis.saintgirons@gmail.com Hi Regis,
    It's hard to figure out the problem. What about trying Kutools for Outlook’s Automatically Detach feature? This feature only requires you to check one options, and all attachments will be automatically downloaded to the specified folder in futre!
  • To post as a guest, your comment is unpublished.
    regis.saintgirons@gmail.com · 3 years ago
    @regis.saintgirons@gmail.com I should add that I am using a gmail inbox
  • To post as a guest, your comment is unpublished.
    regis.saintgirons@gmail.com · 3 years ago
    I need help please !

    I have implemented the rule and the macro as explained. I have even added a msgbox line to make sure that all was ok and it is as the mail subject is properly displayed but the attachement is not saved

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    MsgBox "Mail Subject: " & MItem.Subject
    sSaveFolder = "C:\Users\regis\Documents\Attach\"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub


    What am I doing wrong?
  • To post as a guest, your comment is unpublished.
    kelly.extendoffice@gmail.com · 3 years ago
    @Lahiri Shuvo Hi Lahiri,
    Kutools for Outlook has released the Detach All feature, and you can easily save all attachments in the specified mail folder by the new Detach All feature.
  • To post as a guest, your comment is unpublished.
    kelly.extendoffice@gmail.com · 3 years ago
    @judith Hi Judith,
    Do you mean only save the attachments? Kutools for Outlook’s Detach All feature is designed to save all attachments from multiple emails.
  • To post as a guest, your comment is unpublished.
    kelly.extendoffice@gmail.com · 3 years ago
    @judith In the lastest version of Outlook, the "run a script" option is removed from the Outlook rules. You can follow the method in this article to restore it: https://www.extendoffice.com/documents/outlook/4640-outlook-rule-run-a-script-missing.html
  • To post as a guest, your comment is unpublished.
    Lahiri Shuvo · 3 years ago
    With the VBA script, it's running perfectly for the whole mailbox but I just need to save attachments form a specific folder. Can anyone help me ?
  • To post as a guest, your comment is unpublished.
    judith · 3 years ago
    guys i want to save only documents not the email
  • To post as a guest, your comment is unpublished.
    judith · 3 years ago
    i am failing to get "run the script" in the rules wizard.