Note: The other languages of the website are Google-translated. Back to English
Se connecter  \/ 
x
or
x
Inscrivez-vous  \/ 
x

or

Comment télécharger / enregistrer automatiquement les pièces jointes d'Outlook dans un certain dossier?

De manière générale, vous pouvez enregistrer toutes les pièces jointes d'un e-mail en cliquant sur Pièces jointes > Enregistrer toutes les pièces jointes dans Outlook. Mais, si vous avez besoin de sauvegarder toutes les pièces jointes de tous les e-mails reçus et de réception d'e-mails, l'idéal? Cet article présentera deux solutions pour télécharger automatiquement les pièces jointes d'Outlook vers un certain dossier.


Télécharger automatiquement les pièces jointes Outlook dans le dossier avec VBA et la règle

Cette méthode introduira un script VBA et exécutera ce script avec une règle pour télécharger et enregistrer automatiquement les pièces jointes Outlook dans un certain dossier. Veuillez procéder comme suit:

1. presse autre + F11 touches pour ouvrir la fenêtre Microsoft Visual Basic pour Applications.

2. Cliquez insérer > Module, puis collez ci-dessous le script VBA dans la nouvelle fenêtre Module d'ouverture.

VBA: Enregistrer automatiquement les pièces jointes Outlook dans un certain dossier

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

Notes: Veuillez découvrir sSaveFolder = "C: \ Users \ DT168 \ Documents \ outlook-attachments \"et remplacez le chemin du dossier de destination selon vos besoins.

3. Enregistrez le script VBA et fermez la fenêtre Microsoft Visual Basic pour Applications.

4. Aller à la Courrier afficher, et cliquez sur Accueil > Règles > Gérer les règles et les alertes. Voir la capture d'écran:

5. Dans la boîte de dialogue d'ouverture des règles et alertes, cliquez sur le bouton Nouvelle règle bouton sur la Règles de messagerie languette. Voir la capture d'écran:

6. Maintenant, dans la boîte de dialogue Assistant de règles, veuillez cliquer pour sélectionner le Appliquer la règle aux messages que je reçois option, et cliquez sur le Suivant .

7. Dans la boîte de dialogue de l'assistant de règles (quelle (s) condition (s) voulez-vous vérifier?), Décochez n'importe quelle option et cliquez sur le bouton Suivant bouton. Et puis cliquez sur le Oui dans la boîte de dialogue contextuelle de Microsoft Outlook. Voir la capture d'écran:

8. Maintenant, dans la boîte de dialogue Assistant de règles (que voulez-vous faire avec le message?), Veuillez: (1) Vérifiez la exécuter un script l'option; (2) Cliquez sur le texte de un script pour ouvrir la boîte de dialogue Sélectionner un script, sélectionnez le script que nous avons ajouté à l'étape 2 et cliquez sur le bouton OK bouton; (3) Cliquez Suivant .

9. Dans la boîte de dialogue Assistant de règles (y a-t-il des exceptions?), Cliquez sur le Suivant bouton directement.

10. Maintenant, dans la dernière boîte de dialogue de l'assistant de règles, veuillez nommer la règle dans le Étape 1 , cochez les options dont vous avez besoin dans le Étape 2 section, et cliquez sur finition .

11. Fermez la boîte de dialogue Règles et alertes.

Et maintenant, toutes les pièces jointes sont téléchargées à partir de votre compte de messagerie et enregistrées dans le dossier de destination spécifié. Et toutes les pièces jointes des e-mails entrants seront automatiquement téléchargées et enregistrées dans le dossier spécifié également.


Télécharger automatiquement les pièces jointes Outlook dans le dossier avec Kutools for Outlook

Si Kutools for Outlook est installé, vous pouvez appliquer son Détachement automatique option pour télécharger automatiquement toutes les pièces jointes Outlook et enregistrer facilement dans un certain dossier.

Kutools pour Outlook: Ajoutez plus de 100 outils pratiques pour Outlook, essayez gratuitement sans limitation dans 60 jours. En Savoir Plus      Essai gratuit maintenant

1. Cliquez Kutools > Détachement automatique > Activer pour activer la fonction de détachement automatique.

2. Allez-y pour cliquer Kutools > Détachement automatique > Gestionnaire de détachement automatique.

3. Dans la boîte de dialogue Détachement automatique des pièces jointes, cochez la case Détacher automatiquement toutes les pièces jointes reçues option, puis configurez comme suit:
(1) Cliquez sur le bouton Parcourir  pour spécifier le dossier de destination pour enregistrer les pièces jointes automatiquement détachées;
(2) Il est facultatif de vérifier le Créer des sous-dossiers dans le style suivant option, puis sélectionnez un style de sous-dossier dans la liste déroulante ci-dessous;
(3) Il est facultatif de vérifier le Détacher uniquement les pièces jointes avec l'extension suivante option, puis tapez les extensions de fichier de pièce jointe dans la zone ci-dessous;
(4) Il est facultatif de vérifier l'icône de pièce jointe est toujours restée dans les e-mails options.

Notes: Si vous devez détacher automatiquement les pièces jointes par les expéditeurs, vous pouvez vérifier Détacher automatiquement les pièces jointes par des règles option, cliquez sur Nouveau! puis tapez l'adresse e-mail de l'expéditeur et spécifiez le dossier de destination dans la deuxième boîte de dialogue Détachement automatique des pièces jointes.

4. Clique le Ok bouton pour enregistrer les paramètres.

À partir de maintenant, toutes les pièces jointes (ou les pièces jointes avec des extensions de fichier spécifiées, ou les pièces jointes provenant d'expéditeurs spécifiés en fonction de vos paramètres) seront automatiquement enregistrées.

Notes: Vous pouvez appliquer Kutools pour Outlook Détacher tout (Pièces jointes) ou Sauver tous (Pièces jointes) pour télécharger / enregistrer rapidement toutes les pièces jointes de plusieurs / tous les e-mails reçus dans Outlook.


Démo: télécharger automatiquement les pièces jointes Outlook dans le dossier avec Kutools for Outlook


Trucs: Dans cette vidéo, Kutools l'onglet est ajouté par Kutools pour Outlook. Si vous en avez besoin, cliquez sur ici pour avoir un essai gratuit de 60 jours sans limitation!


Articles Liés:


Kutools for Outlook - Apporte 100 fonctionnalités avancées à Outlook et simplifie grandement le travail!

  • CC / BCC automatique par des règles lors de l'envoi d'e-mails; Transfert automatique Emails multiples par coutume; Réponse automatique sans serveur d'échange, et plus de fonctionnalités automatiques ...
  • Avertissement BCC - afficher le message lorsque vous essayez de répondre à tous si votre adresse e-mail est dans la liste BCC; Rappeler en cas de pièces jointes manquantes, et plus de fonctionnalités de rappel ...
  • Répondre (à tous) avec toutes les pièces jointes dans la conversation par courrier électronique; Répondre à de nombreux e-mails en secondes; Ajouter un message d'accueil automatique quand répondre; Ajouter la date au sujet ...
  • Outils de pièces jointes: gérer toutes les pièces jointes dans tous les courriers, Détachement automatique, Compresser tout, Tout renommer, Tout enregistrer ... Rapport rapide, Compter les courriers sélectionnés...
  • Courriels indésirables puissants par coutume; Supprimer les messages et contacts en double... Vous permettre de faire plus intelligemment, plus rapidement et mieux dans Outlook.
tir kutools outlook onglet kutools 1180x121
tir kutools outlook kutools plus onglet 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.
    Oscar · 1 months ago
    Hi,
    when i use the Kutools plugin, it is possibile to add a rule for all the sender wich include a text in the sender email?
    for example i want to download all the ".txt" attachments recived from all the senders containing "@amazon.com" in his email adress?

    thank you!!
  • To post as a guest, your comment is unpublished.
    J-COB · 1 months ago
    Hi
    I have a problem. I can't find "run a script" command in second step dialog window while creating the rule :/ 
    I have the Outlook2016, any ideas how to find it or turn it on ?
    • To post as a guest, your comment is unpublished.
      Edoardo · 1 months ago
      Hi!
      See this: https://www.extendoffice.com/documents/outlook/4640-outlook-rule-run-a-script-missing.html


  • To post as a guest, your comment is unpublished.
    JoaoAzevedo · 3 months 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.
    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.
      GuestMas · 9 months ago
      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.
      Shilpa · 1 years ago
      HI All, I did all the steps but my script is not working.
      • To post as a guest, your comment is unpublished.
        filng · 1 years ago
        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.
    jahangir · 1 years ago
    i am not find "run a script" option please?
    • To post as a guest, your comment is unpublished.
      TGG · 1 years ago
      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.
    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.
      kellytte · 1 years ago
      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.
    Guil · 2 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.
      kellytte · 2 years ago
      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.
    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.
    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.
      kellytte · 2 years ago
      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.
        Roberta · 2 years ago
        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.
    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.
      Hari · 6 months ago
      Hi Tom, I'm also facing the same problem..is that fixed for you??

  • 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.
    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
      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.
        Aftab · 1 years ago
        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.
    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 · 3 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.
    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.
    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.
      Jasmin Nolasco · 3 years ago
      https://www.extendoffice.com/documents/outlook/4640-outlook-rule-run-a-script-missing.html
  • 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.
    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.
      Suz · 3 years ago
      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.
        Frodo · 2 years ago
        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.
      kelly001 · 3 years ago
      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
      I should add that I am using a gmail inbox
  • 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.
      kelly.extendoffice@gmail.com · 3 years ago
      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.
    judith · 3 years ago
    guys i want to save only documents not the email
    • To post as a guest, your comment is unpublished.
      kelly.extendoffice@gmail.com · 3 years ago
      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.
    judith · 3 years ago
    i am failing to get "run the script" in the rules wizard.
    • To post as a guest, your comment is unpublished.
      kelly.extendoffice@gmail.com · 3 years ago
      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.
    judith · 3 years ago
    Hello, i want to save my pdf documents from outlook inbox into a specific folder,i want my attachment to be saved as pdf files with its name so that when i open the documents in my webside it is written "qoute document" exactly the way it has been saved. or save the documents with subject line and email body.Does your application support the mentioned above? thanks for your respond in advance
  • To post as a guest, your comment is unpublished.
    Raj · 3 years ago
    The file names in the folder are same, so it is getting replaced. what to do about that?
    • To post as a guest, your comment is unpublished.
      kelly.extendoffice@gmail.com · 3 years ago
      Hi,
      Do you mean attachment names are same? If attachment names are same, they won’t not be replaced, but be named as filename(1), filename(2), filename(3)… in the destination folder.
  • To post as a guest, your comment is unpublished.
    champnos@hotmail.com · 3 years ago
    Using the Outlook 2010 method which works brilliantly, I now need to be able to only save certain attachment types, such as PDF and JPG. I have no VBA knowledge can someone tell me what to add to do this, I have tried a few changes to the code with no luck

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "U:\Attachments\"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub
    • To post as a guest, your comment is unpublished.
      champnos@hotmail.com · 3 years ago
      Got there in the endPublic Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
      Dim oAttachment As Outlook.Attachment
      Dim sSaveFolder As String
      sSaveFolder = "U:\Attachments\"
      For Each oAttachment In MItem.Attachments
      If UCase(Right(oAttachment.FileName, 3)) = "PDF" Or UCase(Right(oAttachment.FileName, 3)) = "TIF" Then _
      oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
      Next
      End Sub
      • To post as a guest, your comment is unpublished.
        kelly.extendoffice@gmail.com · 3 years ago
        Hi,
        Below VBA script will save all PDF attachments from mail folders. For saving from a certain folder, you can specify the folder when manually running the rule.


        Public Sub SaveAttachmentsToDisk(EmailItem As Outlook.MailItem)
        Dim xAttachment As Outlook.Attachment
        Dim xDotPos As Integer
        Dim xSavePath As String, xFileType As String
        xSavePath = "C:\Users\DT168\Documents\outlook-attachments\"
        For Each xAttachment In EmailItem.Attachments
        xDotPos = InStrRev(xAttachment.DisplayName, ".")
        xFileType = Mid(xAttachment.DisplayName, xDotPos, Len(xAttachment.DisplayName) - xDotPos + 1)
        If xFileType = ".pdf" Then
        xAttachment.SaveAsFile xSavePath & xAttachment.DisplayName
        End If
        Next
        End Sub
        • To post as a guest, your comment is unpublished.
          champnos@hotmail.com · 3 years ago
          Got it up and running no big issues. But when testing I noted one email with an attached PDF no matter what I do the script will not save the file. It is not the file name, it is not the subject, it is not who it came from. I can only think its something in the body of the email. Any ideas what would stop a file saving when all others pretty much exactly the same work?
  • To post as a guest, your comment is unpublished.
    cheunt2@gmail.com · 3 years ago
    I had trouble with this but I got from another resource that you have to allow all macros to run in Outlook. You can achieve this by following the following steps:
    1 - Goto File -> Trust Center then click on Trust Center Settings on the right
    2 - Macro Settings -> Enable all macros
    3 - Restart Outlook and then it should work
    • To post as a guest, your comment is unpublished.
      nilima · 1 years ago
      thank you so much! This solved my problem. Script was not running at all!
    • To post as a guest, your comment is unpublished.
      Joon Lin Ng · 1 years ago
      Thank you very much..
    • To post as a guest, your comment is unpublished.
      kelly.extendoffice@gmail.com · 3 years ago
      Hi Tony,
      Thank you for your comments.
  • To post as a guest, your comment is unpublished.
    EC · 3 years ago
    I am interested in the Auto Save Attachment feature, but 2 questions:
    1. Can I activate this ONLY for a subfolder? I don't want this to run on every single email. Only emails that are redirected to a subfolder via an Outlook Rule.
    2. When you say "detach", to me that implies the attachment is removed from the message permanently. I don't want to remove the attachment. I just want to download a copy of it to a folder. So which is it? Does your software remove the attachment or does it just save a copy?
    • To post as a guest, your comment is unpublished.
      kelly.extendoffice@gmail.com · 3 years ago
      Hi EC,
      Thank you for your interesting in our software.
      1. At present, the Auto Detach feature will save every attachment arriving in the Inbox folder by default, and the Detach feature will remove attachments and leave hyperlinks linking to the saved attachments.
      2. Our development team is improving and enhancing both feature now. In the near future, users are entitled to auto detaching attachments by special criteria (such as color, flag), folders, etc.; and the detach feature will be enhanced to several sub-features, such as save attachments, delete attachments and leave hyperlinks, delete attachments, etc. Please be patient for the new version.
      • To post as a guest, your comment is unpublished.
        Almira · 3 years ago
        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.
    finance@rtboerdery.co.za · 3 years ago
    I want my attachments to be downloaded into (automaticall)y created date folders under my predefined folders. Example: I want all my Gsuite attachments and emails to download into an automatically created date folder (mm yyyy) under the folder Gsuite as with this google app https://chrome.google.com/webstore/detail/save-emails-and-attachmen/nflmnfjphdbeagnilbihcodcophecebc. Is it possible with Kutools? If not, can someone help me with a script?
    • To post as a guest, your comment is unpublished.
      kelly.extendoffice@gmail.com · 3 years ago
      Hi Casper,
      Kutools can automatically create subfolder named as email subject, and all attachments in the specified email will be saved into this subfolder.
      At present, our development team is optimizing the Detach All Attachments feature and Auto Detach All Attachments feature, and both features will be enhanced and efficient in future.
  • To post as a guest, your comment is unpublished.
    Dhinesh · 3 years ago
    I have done all scripting to download the attachments from outlook mail and my script is working fine when i run it manually. I would like to automate the process using the Rule option. But i couldn't see my macro in the Rules Wizard window. I have enabled the below option in the registry too
    HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security
    DWORD: EnableUnsafeClientMailRules
    Value: 1

    But still i couldn't see my macro in the Rule Wizard list. My rule wizard list is empty but i have created the macro already and its manually working fine. I have to bring the macro in my Rules wizard to automate the process. Please help me if you have any ideas!
  • To post as a guest, your comment is unpublished.
    Eric VT · 4 years ago
    Hi, script works fine ... but want to extract the PDF's from a sub-folder, not from the main Inbox. Is there a way to change the script ?
    Thank you in advance !
    • To post as a guest, your comment is unpublished.
      · 4 years ago
      Hi Eric,
      Below VBA script will save all PDF attachments from mail folders. For saving from a certain folder, you can specify the folder when manually running the rule.


      Public Sub SaveAttachmentsToDisk(EmailItem As Outlook.MailItem)
      Dim xAttachment As Outlook.Attachment
      Dim xDotPos As Integer
      Dim xSavePath As String, xFileType As String
      xSavePath = "C:\Users\DT168\Documents\outlook-attachments\"
      For Each xAttachment In EmailItem.Attachments
      xDotPos = InStrRev(xAttachment.DisplayName, ".")
      xFileType = Mid(xAttachment.DisplayName, xDotPos, Len(xAttachment.DisplayName) - xDotPos + 1)
      If xFileType = ".pdf" Then
      xAttachment.SaveAsFile xSavePath & xAttachment.DisplayName
      End If
      Next
      End Sub
      • 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.
    WarrenDB · 4 years ago
    If the option for "Run a Script" is missing, it's because it's blocked by default now since a security update a few months ago. Look here for more information: https://www.slipstick.com/outlook/rules/outlook-2016-run-a-script-rules/
  • To post as a guest, your comment is unpublished.
    Ndesouza · 4 years ago
    On Outlook 2013 the "run a script" option isnt available can I do anything else to save attachments from an email without using Kutools

  • To post as a guest, your comment is unpublished.
    Stanley · 4 years ago
    Hi all experts,

    I try hard to setup the automatic download as described above by using VBA script but nothing has been saved in the target folder.

    I tried this on Outlook 2007 and Outlook 2010, and also make sure the folder has all the necessary authorities. But still no single attachment has been saved. Can anyone help me on this?

    Cheers
    Stanley
  • To post as a guest, your comment is unpublished.
    David · 4 years ago
    Hi

    I am setting up the script you have at the top of the page and it works OK, however, I would like to name the attachment being saved so that it overwrites the old one.
    What would I need to add to get this to happen?
    Thanks
    David
  • To post as a guest, your comment is unpublished.
    Nathan · 4 years ago
    Hi All,

    How can I set this up so that I have a different script to send files to different folders?

    Thank you for any help offered in advance!
  • To post as a guest, your comment is unpublished.
    vandy · 4 years ago
    Hi,
    I must say its superb script, it resolved 80% of my work but still I have one issue. The attachments I receive is with new date and time-stamp on daily basis and I want to auto save these attachment but by removing the date/time stamp so that next time it will replace/overwrite and save new copy with same name.,Do not want every day attachments getting save with new date. instead same file needs to be replaced at same location.

    Can you please help.
  • To post as a guest, your comment is unpublished.
    Marcos · 4 years ago
    Hi thanks a lot this work but only once, next times the file isnt saved in the disk :( I dont know why, any idea? thanks
    • To post as a guest, your comment is unpublished.
      Bence · 3 years ago
      Hi, I have the same problem (It work only once). Could you solve the problem?
      • To post as a guest, your comment is unpublished.
        · 3 years ago
        Hi,
        Please check if the destination folder outlook-attachments existing or not. And more information about this problem will be helpful. Thanks!
  • To post as a guest, your comment is unpublished.
    Jess · 4 years ago
    Can Kutools be set up so that it only saves attachments from certain emails based on the subject? And can the same file be saved to multiple directories from a single email? We want to use this for report distribution instead of email.
  • To post as a guest, your comment is unpublished.
    fabian · 4 years ago
    is there any possibility to change this so that only files that have certain words in their name are copied?
  • To post as a guest, your comment is unpublished.
    Bob · 4 years ago
    Hi Jayayah.

    Try doing a check for the file before saving.

    Dim filepath As String
    filepath = Dir(sSaveFolder & oAttachment.DisplayName)
    If filepath = "" Then
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Else
    oAttachment.SaveAsFile sSaveFolder & "1-" & oAttachment.DisplayName
    End if

    and so on... play about with the code and let me know how you get on..
  • To post as a guest, your comment is unpublished.
    Janayah · 4 years ago
    This works really well for me

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "\\Dck-server-02\g\00 Uploads\"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub


    As you can see i have left the filename that is the attachment as the same for when it copies to the network drive.
    However, if multiple emails come through with the same filename for the attachment, the script then allows the most recent attachment to overwrite the previous attachment in the network folder.
    Is there an edit which i can input into the script which will append a "-1" "-2" "-3" etc... to the end of the attachment filename?
    So for example, if the attachment is named "inspection" and i get multiple that come through can i have them renamed to "inspection-1" "inspection-2" "inspection-3"

    Any help would be appreciated SO MUCH!

    Thank you.
  • To post as a guest, your comment is unpublished.
    Harsha · 4 years ago
    Thankyou so much for the so clearly mentioned steps.... These helped me alot and made my job very easy...
    THANKYOU.....!!
  • To post as a guest, your comment is unpublished.
    Harsha · 4 years ago
    Hi,
    I have been trying to follow the steps as directed i selected all the above options but after selecting the "run a script" option and selecting the link "a script" I do not get the script in that dialogue box.
    Please help as soon as possible.
    Thanks!
    • To post as a guest, your comment is unpublished.
      Dean · 4 years ago
      I had this same issue. I found a resolution here:

      https://answers.microsoft.com/en-us/msoffice/forum/msoffice_outlook-mso_win10/the-option-to-run-a-scritp-has-disappeared-from/d289e698-47fa-497a-80fa-633067a0de37#ThreadAnswers

      Once i updated my registry with the key... it started working as it was supposed to again. Give it a try and see if it works for you.
  • To post as a guest, your comment is unpublished.
    Avnika Rastogi · 4 years ago
    Hi, I have been trying to follow the steps as directed. but i do not get the 'run a script' option after saving the macro. I have enabled the macros, restarted outlook several times. but it still the option still does not work. Please help.

    Thanks!
    • To post as a guest, your comment is unpublished.
      Dinushe · 4 years ago
      I agree with AVNIKA. I have the same problem :-|