Note: The other languages of the website are Google-translated. Back to English
Войти  \/ 
x
or
x
Регистрация  \/ 
x

or

Как автоматически загружать / сохранять вложения из Outlook в определенную папку?

Вообще говоря, вы можете сохранить все вложения одного письма, нажав Вложения > Сохранить все вложения в Outlook. Но если вам нужно сохранить все вложения из всех полученных писем и получающих писем, какой идеал? В этой статье будут представлены два решения для автоматической загрузки вложений из Outlook в определенную папку.


Автоматически загружать вложения Outlook в папку с VBA и правилом

Этот метод представит сценарий VBA и запустит этот сценарий с правилом для автоматической загрузки и сохранения вложений Outlook в определенную папку. Пожалуйста, сделайте следующее:

1, Нажмите другой + F11 клавиши, чтобы открыть окно Microsoft Visual Basic для приложений.

2. Нажмите Вставить > Модуль, а затем вставьте ниже сценарий VBA в новое открывающееся окно модуля.

VBA: автоматическое сохранение вложений Outlook в определенную папку

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

Внимание: Пожалуйста, узнайте sSaveFolder = "C: \ Users \ DT168 \ Documents \ outlook-attachments \"и замените путь к целевой папке, как вам нужно.

3. Сохраните сценарий VBA и закройте окно Microsoft Visual Basic для приложений.

4, Перейти к почта просмотрите и щелкните Главная > Правила > Управление правилами и предупреждениями. Смотрите скриншот:

5. В открывшемся диалоговом окне «Правила и предупреждения» нажмите кнопку Новое правило Кнопка на Правила электронной почты таб. Смотрите скриншот:

6. Теперь в диалоговом окне мастера правил щелкните, чтобы выбрать Применить правило для сообщений, которые я получаю и нажмите Далее кнопку.

7. В диалоговом окне мастера правил (какие условия вы хотите проверить?) Снимите флажок с любого параметра и нажмите кнопку Далее кнопка. А затем нажмите Да во всплывающем диалоговом окне Microsoft Outlook. Смотрите скриншот:

8. Теперь в диалоговом окне мастера правил (что вы хотите сделать с сообщением?), Пожалуйста: (1) Проверить запустить сценарий вариант; (2) Щелкните текст скрипт чтобы открыть диалоговое окно Select Script, выберите сценарий, который мы добавили на шаге 2, и нажмите кнопку OK кнопка; (3) Нажмите Далее кнопку.

9. В диалоговом окне мастера правил (есть ли исключения?) Щелкните значок Далее кнопку напрямую.

10. Теперь в последнем диалоговом окне мастера правил укажите имя правила в Шаг 1 выберите нужные параметры в Шаг 2 и нажмите Завершить кнопку.

11. Закройте диалоговое окно «Правила и предупреждения».

И теперь все вложения загружаются из вашей учетной записи электронной почты и сохраняются в указанной папке назначения. И все вложения входящих писем будут автоматически загружены и сохранены в указанную папку.


Автоматически загружать вложения Outlook в папку с помощью Kutools for Outlook

Если у вас установлен Kutools for Outlook, вы можете применить его Авто отсоединение возможность автоматически загружать все вложения Outlook и легко сохранять их в определенной папке.

Kutools для Outlook: Добавьте более 100 удобных инструментов для Outlook, которые можно попробовать бесплатно без ограничений в течение 60 дней. Читать далее      Бесплатная пробная версия

1. Нажмите Kutools > Авто отсоединение > Включить для включения функции автоматического отключения.

2. Продолжайте нажимать Kutools > Авто отсоединение > Диспетчер автоматического отключения.

3. В диалоговом окне "Автоматическое отключение вложений" установите флажок Автоматически отсоединить все полученные вложения вариант, а затем настройте следующим образом:
(1) Нажмите кнопку просмотра  указать папку назначения для сохранения автоматически отключаемых вложений;
(2) Необязательно проверять Создайте подпапки в следующем стиле вариант, а затем выберите один стиль подпапки из раскрывающегося списка ниже;
(3) Необязательно проверять Только отсоедините насадки со следующим расширением вариант, а затем введите расширения файла вложения в поле ниже;
(4) Необязательно проверять значок вложения по-прежнему остается в письмах настройки.

Внимание: Если вам нужно автоматически откреплять вложения отправителями, вы можете проверить Автоотключение вложений по правилам вариант, щелкните НОВИНКИ , а затем введите адрес электронной почты отправителя и укажите папку назначения во втором диалоговом окне «Автоматическое отключение вложений».

4, Нажмите Ok чтобы сохранить настройки.

С этого момента все вложения (или вложения с указанными расширениями файлов, или вложения от указанных отправителей в зависимости от ваших настроек) будут автоматически сохраняться.

Внимание: Вы можете применить Kutools для Outlook Отключить все (Вложения) или Сохранить все (Вложения) для быстрой загрузки / сохранения всех вложений из нескольких / всех полученных писем в Outlook.


Демонстрация: автоматически загружать вложения Outlook в папку с помощью Kutools for Outlook


Чаевые: В этом видео, Kutools вкладка добавлена Kutools для Outlook. Если вам это нужно, нажмите здесь получить 60-дневную бесплатную пробную версию без ограничений!


Статьи по теме:


Kutools for Outlook - добавляет в Outlook 100 расширенных функций и делает работу намного проще!

  • Авто CC / BCC по правилам при отправке электронной почты; Автопересылка Несколько писем по индивидуальному заказу; Автоответчик без сервера обмена и дополнительных автоматических функций ...
  • Предупреждение BCC - показать сообщение при попытке ответить всем если ваш почтовый адрес находится в списке BCC; Напоминать об отсутствии вложений, и многое другое напоминает функции ...
  • Ответить (всем) со всеми вложениями в почтовой беседе; Ответить на много писем в секундах; Автоматическое добавление приветствия при ответе; Добавить дату в тему ...
  • Инструменты для вложений: управление всеми вложениями во всех письмах, Авто отсоединение, Сжать все, Переименовать все, сохранить все ... Быстрый отчет, Подсчет выбранных писем...
  • Мощные нежелательные электронные письма по обычаю; Удаление повторяющихся писем и контактов... Позвольте вам делать в Outlook умнее, быстрее и лучше.
выстрел kutools outlook kutools tab 1180x121
выстрел 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.
    Kumar · 1 months ago
    Hi,

    I executed the VBA + Rule option and it seemed to work perfectly. However, it recently stopped working with no errors. The rule is set to read the subject line, move to a certain folder if there is a certain subject, and then run the script. I know the trigger is working in the rule because the first action (move to folder) is working as it should.

    Any idea why the rule trigger would work, but the documents are no longer being saved?

    Things I have tried/checked:
    -The file path is correct
    -I added delays in various spots in the vba using application.wait
    -outlook has been shutdown and re-opened, and so has my laptop

    (disclosure: I am a bit of a VBA newbie, but have beginner level coding knowledge)
  • To post as a guest, your comment is unpublished.
    Oscar · 3 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 · 4 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 · 4 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 · 5 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 · 1 years 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.
        Kumar · 1 months ago
        TGG, could you see my post above (newest post on this thread) and possibly assist?
  • 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 · 8 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 · 3 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 · 3 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 · 3 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 · 3 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 · 3 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 · 3 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 · 3 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.
        Kunal · 1 months ago
        i tried changing the security by Edit QWORD (64-BIT) byt EnableUnsafeClientMailRules to 1 but still run script is not working
        any suggestion
  • 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 · 4 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 · 4 years ago
      Hi Tony,
      Thank you for your comments.
  • To post as a guest, your comment is unpublished.
    EC · 4 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 · 4 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 · 4 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 · 4 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 · 4 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 · 4 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.
        · 4 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.