How to Automatically Download/Save Attachments in Outlook to a Certain Folder Using [VBA + Rules]?

Поделиться
HTML-код
  • Опубликовано: 9 июн 2024
  • In this video, I talk about How to Automatically Download/Save Attachments in Outlook to a Certain Folder Using [VBA + Rules]?
    The below link will walk you to the written tutorial, in case you prefer reading over watching the video:
    mailsmartly.com/outlook-autom...
    -----------------------------------------------------------------------------------------------------------------------
    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
    -----------------------------------------------------------------------------------------------------------------------
    Run-a-Script Missing in Outlook Rule Wizard - Go through this article - mailsmartly.com/outlook-autom...
    I hope you will find it helpful.
    ☕ If you find my Microsoft Outlook videos useful and would like to support me, you can buy me a coffee - www.buymeacoffee.com/AmitBansal
    Subscribe to get awesome Microsoft Outlook Tips every week:
    / @mailsmartly
    To Get Free Microsoft Outlook Keyboard Shortcut PDF file visit and Subscribe.
    mailsmartly.com/
    #Outlook #Microsoft #Microsoft365 #outlooktips #officetips
    #techforall #techforall2019 #tutorial #tutorialyoutube #microsoftoffice #microsoftoffice365 #microsoftoutlook #outlook365 #outlooktutorial #outlooktutorial #outlook2016 #outlook2019 #outlook2022 #office2010 #office2013 #office2016 #office2019 And make sure you subscribe to my channel!
    - EQUIPMENT USED --------------------------------
    ○ My camera - amzn.to/3CwIoER
    ○ Microphone - amzn.to/3Cg5YVW
    ○ Camera tripod - amzn.to/42l7TmJ
    ○ Studio lights - amzn.to/3WNUSBb
    ○ Dual monitor mount stand - amzn.to/43pOfr5
    ○ Web camera - amzn.to/45LT9Al
    ○ Shock mount - amzn.to/3OXfHbj
    ○ Boom Arm - amzn.to/3MV7FgE
    DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links I provide, I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel, so I can continue to provide you with free content each week!

Комментарии • 36

  • @SwahiliSpicE
    @SwahiliSpicE 3 месяца назад

    I am so glad I came across this video. I managed to use this process to download more than 2000 attachments received from a specific email address. This took about 2 hours of waiting time. Then, some of the attachments were zipped folders and I only wanted all PDFs from the email attachments. So I extracted all the files from the zipped folders at once (by selecting all the zipped folder first) which took another 2 hours to extract but and I can now search for .pdf and I have over 17k pdf files which I wanted on their own and not in folders. I was then able to just copy and paste them so I have one folder with 17k PDF files and no subfolders. I am going to extract the data in these PDFs (which I have a way of doing in less than a day) it will enable me to save the business that I work for around €1.5m. Thank you so so so so much!

  • @Quirkafleeg
    @Quirkafleeg 9 месяцев назад

    Thanks very much. Really helped me out.

  • @jks5657
    @jks5657 Год назад

    Such a life saver!!! 10000 thanks!!

  • @gokmenaykut
    @gokmenaykut Год назад +1

    Thanks , it helps a lot

  • @yashpalchopra9931
    @yashpalchopra9931 10 месяцев назад

    Amir, super video. I have few questions. Could we make this naming conventions based+dates +separate file with the time rxd.

  • @magnet130
    @magnet130 Год назад

    thanks for your nice video
    can I write a script that save all my emails (send and receive mails) to a certain folder automatically?
    or simply use (save as) feature automatically for all mails?
    I really appreciate all your tutorials and helps.

  • @leelow85
    @leelow85 8 месяцев назад

    Great work! One question, what can I do to also automatically save attachments from mails which are manually moved to this inbox?

  • @raulmarines1047
    @raulmarines1047 Год назад

    You are a genious!

  • @excused1277
    @excused1277 Год назад

    Helpful video! What would be the additional code for every same title of email coming in, the new attachment will get downloaded and REPLACED into the specific folder?

  • @user-br4md8tm5l
    @user-br4md8tm5l 4 месяца назад

    Hi, may I know is there any way to save all emails in my computer example in a folder in email format? I wish to search the folder with keywords and the email that i'm looking will pounce out?

  • @raushankumarpandey897
    @raushankumarpandey897 Год назад

    Thanks for nice video...could you plz help me with if I need to download mail based on today date and others will be deleted in folder and this is a daily activity for me...Plz suggest 😊

  • @GrasppowerA
    @GrasppowerA Год назад +1

    So nice

  • @evetteprout9814
    @evetteprout9814 4 месяца назад

    How can you please run a script to save the attachments to a new Outlook Inbox Folder instead of to a computer drive? The attachments are not PDFs - they are emails that have been attached to an incoming email

  • @shivanijoshi4857
    @shivanijoshi4857 Год назад

    Sir can we also rename it at the tym of saving because as I am an employee of SCM department and get GRNs but i want to save that GRNs according to my invoice no.??
    Please reply if possible 🙏

  • @pastukas
    @pastukas Год назад

    unfortunately, I can only do this once for a single contact. If I add another module, I am unable to add it to run script. I need a new project and it is impossible to do.

  • @MiguelAngelEscajedaMedina
    @MiguelAngelEscajedaMedina Год назад

    Amit, great video, very well explained, it worked just fine! :)
    ...I'm struggling with several attachments which has same name since are all targeting to the same folder. So I tried to index it with the received date and the item potion. the "oAttachment.Index" is working since is part from the same attribute family, but when I want to take from the "MItem.ReceivedTime" which belong to a different one doesn't work. Could you help me to correct the code, please?
    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "C:\db\folder\"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & & "-" & oAttachment.Index & "-" & oAttachment.DisplayName
    Next
    End Sub

  • @michaelsmal7376
    @michaelsmal7376 Год назад +1

    Hi, thanks for great video. I am saving multiple emails attachments with the same name. The script is then overriding the last attachment, meaning that only the last attachment is saved. Do you have a script that can rename the files if same name. eg : file, file(1), file(2) etc.

    • @adamhecimovich9065
      @adamhecimovich9065 Год назад +1

      I have this same issue as well.

    • @zavix6699
      @zavix6699 11 месяцев назад

      @@adamhecimovich9065 same issue here

  • @klchan988
    @klchan988 Год назад +2

    Does the solution for the missing Run Script option apply to Outlook 365 ?

  • @letsexplorewithzak3614
    @letsexplorewithzak3614 Год назад

    Possible to rename attachment datewise

  • @berenicee5579
    @berenicee5579 11 месяцев назад

    Can we do this by attachments name?

  • @ivankristianto7446
    @ivankristianto7446 Год назад +1

    I can't find " run as script" . I have been set outlook /trus center/macro,but can't show too "run as script"

  • @santhoshgowda5727
    @santhoshgowda5727 6 месяцев назад

    Bro, is this work for Zip files?

  • @velurichiranjeevi3260
    @velurichiranjeevi3260 Год назад

    Does this work for hyperlinks which we receive in outlook ?

  • @dipsxyz
    @dipsxyz Год назад

    The code saved in Module does not appear for selection under 'Select script' after clicking 'Script'. What could be the reason?

  • @ravi123tube
    @ravi123tube Месяц назад

    I am unable to find the Run a script Option

    • @mailsmartly
      @mailsmartly  Месяц назад

      You can refer this mailsmartly.com/restore-missing-run-a-script-option-in-outlook/

  • @cornell9126
    @cornell9126 Год назад

    𝓅𝓇𝑜𝓂𝑜𝓈𝓂 🙌