نصيحة: اللغات الأخرى مترجمة من قبل Google. يمكنك زيارة English نسخة من هذا الرابط.
تسجيل الدخول
x
or
x
x
التسجيل
x

or

كيفية تنزيل / حفظ المرفقات تلقائيا من أوتلوك إلى مجلد معين؟

بشكل عام، يمكنك حفظ جميع المرفقات من بريد إلكتروني واحد بالنقر مرفقات > حفظ جميع المرفقات في أوتلوك. ولكن، إذا كنت بحاجة إلى حفظ جميع المرفقات من جميع رسائل البريد الإلكتروني الواردة وتلقي رسائل البريد الإلكتروني، أي مثالية؟ ستعرض هذه المقالة حلين لتحميل المرفقات تلقائيا من أوتلوك إلى مجلد معين.

حفظ / تصدير جميع المرفقات بسرعة من رسائل بريد إلكتروني متعددة في أوتلوك

عادة يمكننا حفظ المرفقات من بريد إلكتروني واحد مع تفعيل أدوات المرفقات وتطبيق حفظ جميع المرفقات في أوتلوك. ولكن، ماذا لو حفظ المرفقات من رسائل البريد الإلكتروني متعددة، أو من مجلد البريد بأكمله في أوتلوك؟ محاولة كوتولس لميزة أوتلوك في فصل الكل (المرفقات). انقر للحصول على نسخة تجريبية مجانية مدتها يوم 60 دون قيود!
حفظ المرفقات في عدة رسائل البريد الإلكتروني كتوشنومك
بالمناسبة، كوتولس ل أوتلوك كما يوفر الحل تلقائيا لحفظ أو تصدير كافة المرفقات من جميع رسائل البريد الإلكتروني الواردة في أوتلوك.

علامة تبويب Office - تمكين التحرير والتصفح في Tabbed ، وجعل العمل أسهل بكثير ...
Kutools for Outlook - يجلب ميزات متقدمة قوية 100 إلى Microsoft Outlook
  • السيارات سيسي / بسك عن طريق القواعد عند إرسال البريد الإلكتروني ؛ إعادة توجيه تلقائي رسائل البريد الإلكتروني المتعددة حسب القواعد ؛ رد آلي بدون خادم تبادل ، والمزيد من الميزات التلقائية ...
  • تحذير BCC - إظهار الرسالة عند محاولة الرد على الكل إذا كان عنوان بريدك في قائمة BCC ؛ تذكير عند فقد المرفقات، وتذكير المزيد من الميزات ...
  • الرد (الكل) مع جميع المرفقات في محادثة البريد ؛ الرد على العديد من رسائل البريد الإلكتروني مرة واحدة ؛ إضافة تحية السيارات عند الرد إضافة التاريخ والوقت إلى الموضوع ...
  • أدوات المرفقات: فصل تلقائي ، ضغط الكل ، إعادة تسمية الكل ، حفظ تلقائي للكل ... تقرير سريع، عدد الرسائل المختارة ، إزالة الرسائل المكررة وجهات الاتصال ...
  • أكثر من ميزات 100 المتقدمة سوف حل معظم مشاكلك في Outlook 2010-2019 و 365. ميزات كاملة النسخة التجريبية المجانية من 60.

السهم الأزرق الفقاعة اليمنى تلقائيا تحميل المرفقات أوتلوك إلى مجلد مع فبا والقاعدة

هذه الطريقة سوف يعرض البرنامج النصي فبا، وتشغيل هذا سكريب مع قاعدة لتحميل تلقائيا وحفظ المرفقات أوتلوك إلى مجلد معين. يرجى القيام بما يلي:

1. صحافة قديم + F11 مفاتيح لفتح إطار ميكروسوفت فيسوال باسيك فور أبليكاتيونس.

2. انقر إدراج > وحدة، ثم لصق أسفل البرنامج النصي فبا في نافذة الوحدة الافتتاحية الجديدة.

فبا: أوتو سيف أوتلوك المرفقات في مجلد معين

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

ملاحظة:: يرجى معرفة ذلك سافيفولدر = "C: \ وسرس \ دتسنومكس \ دوكومينتس \ أوتلوك-أتاشمنتس \"، واستبدال مسار المجلد الوجهة حسب الحاجة.

3. حفظ البرنامج النصي فبا وإغلاق إطار ميكروسوفت فيسوال باسيك فور أبليكاتيونس.

4. انتقل إلى بريد عرض، وانقر فوق الصفحة الرئيسية > قواعد > إدارة القواعد والتنبيهات. انظر لقطة الشاشة:

5. في مربع الحوار "قواعد التنبيهات" والتنبيهات، الرجاء النقر فوق قانون جديد زر على قواعد البريد الإلكتروني التبويب. انظر لقطة الشاشة:

6. الآن في مربع الحوار معالج القواعد، الرجاء انقر لتحديد تطبيق القاعدة على الرسائل التي أتلقىها الخيار، وانقر فوق التالى .

7. في مربع الحوار "معالج القواعد" (أي الشروط التي تريد التحقق منها)، يرجى إلغاء تحديد أي خيار، والنقر على التالى زر. ثم انقر فوق نعم زر في مربع الحوار ميكروسوفت أوتلوك ظهرت. انظر لقطة الشاشة:

8. الآن في مربع الحوار معالج القواعد (ماذا تريد أن تفعل مع الرسالة؟)، الرجاء: 1 افحص ال تشغيل البرنامج النصي الخيار. 2 انقر على نص السيناريو لفتح مربع الحوار تحديد البرنامج النصي، حدد البرنامج النصي الذي أضفناه في الخطوة شنومك وانقر فوق OK زر؛ 3 انقر على التالى .

9. في مربع الحوار معالج القواعد (هل هناك أي استثناءات؟)، الرجاء النقر فوق التالى زر مباشرة.

10. الآن في مربع الحوار معالج القواعد الأخير، يرجى تسمية القاعدة في خطوة 1 مربع، والتحقق من الخيارات التي تحتاج إليها في خطوة 2 ، ثم انقر فوق نهاية .

11. أغلق مربع الحوار القواعد والتنبيهات.

والآن يتم تحميل كافة المرفقات من حساب البريد الإلكتروني الخاص بك وحفظها في مجلد الوجهة المحدد. وسيتم تلقائيا تحميل جميع مرفقات رسائل البريد الإلكتروني الواردة وحفظها في المجلد المحدد أيضا.


السهم الأزرق الفقاعة اليمنى تلقائيا تحميل المرفقات أوتلوك إلى مجلد مع كوتولس ل أوتلوك

إذا كان لديك كوتولس ل أوتلوك تثبيت، يمكنك تطبيق لها أوتو ديتاش الخيار تلقائيا لتحميل كافة مرفقات أوتلوك وحفظ إلى مجلد معين بسهولة.

1. انقر Kutools > الخيارات. انظر لقطة الشاشة:

2. في مربع الحوار خيارات المرفقات، انتقل إلى عام وعلامة التبويب، و: 1 افحص ال فصل تلقائيا جميع المرفقات الواردة الخيار. 2 انقر على صور جاهزة زر لتحديد مجلد الوجهة؛ 3 افحص ال إنشاء مجلدات فرعية في النمط التالي الخيار، وتحديد بنية مجلد من أسفل القائمة المنسدلة. 4 انقر على Ok زر. انظر لقطة الشاشة:

من الآن فصاعدا، سيتم تلقائيا تحميل جميع مرفقات رسائل البريد الإلكتروني الواردة وحفظها في مجلد الوجهة المحدد.

ملاحظة:: يمكنك تطبيق كوتولس ل أوتلوك فصل الكل (المرفقات) ميزة لتحميل بسرعة / حفظ كافة المرفقات من متعددة / جميع رسائل البريد الإلكتروني الواردة في أوتلوك.
حفظ المرفقات في رسائل البريد الإلكتروني متعددة

انقر للتنزيل كوتولس ل أوتلوك, نسخة تجريبية مجانية من 60-day بلا قيود!

السهم الأزرق الفقاعة اليمنىعرض: تلقائيا تحميل المرفقات أوتلوك إلى مجلد مع كوتولس ل أوتلوك

معلومات سرية: في هذا الفيديو، Kutools تتم إضافة علامة التبويب بواسطة كوتولس ل أوتلوك. إذا كنت في حاجة إليها، يرجى النقر هنا الحصول على نسخة تجريبية مجانية من 60 يومًا دون قيود!


السهم الأزرق الفقاعة اليمنىمقالات ذات صلة


Kutools for Outlook - يجلب ميزات 100 المتقدمة إلى Outlook ، وجعل العمل أسهل بكثير!

  • السيارات سيسي / بسك عن طريق القواعد عند إرسال البريد الإلكتروني ؛ إعادة توجيه تلقائي رسائل البريد الإلكتروني متعددة حسب الطلب ؛ رد آلي بدون خادم تبادل ، والمزيد من الميزات التلقائية ...
  • تحذير BCC - إظهار الرسالة عند محاولة الرد على الكل إذا كان عنوان البريد الخاص بك في قائمة BCC; تذكير عند فقد المرفقات، وتذكير المزيد من الميزات ...
  • الرد (الكل) مع جميع المرفقات في محادثة البريد; الرد على العديد من رسائل البريد الإلكتروني في ثوان؛ إضافة تحية السيارات عند الرد إضافة التاريخ إلى الموضوع ...
  • أدوات المرفقات: إدارة جميع المرفقات في جميع الرسائل ، أوتو ديتاش, ضغط الكل، إعادة تسمية الكل ، حفظ الكل ... تقرير سريع ، عدد الرسائل المختارة...
  • رسائل البريد الإلكتروني العشوائي قوية حسب الطلب إزالة الرسائل المكررة وجهات الاتصال... يمكنك من القيام بذكاء وأسرع وأفضل في Outlook.
kutools لقطة توقعات kutools علامة التبويب 1180x121
kutools لقطة توقعات kutools بالإضافة إلى علامة التبويب 1180x121
Say something here...
symbols left.
You are guest ( Sign Up? )
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.
    Guil · 3 months 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 months 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 · 8 months 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 · 9 months ago
    Hello,

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


    Thanks

    Krishnakant
  • To post as a guest, your comment is unpublished.
    Adarsh · 9 months 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 · 9 months 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.
    Adarsh · 9 months 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 · 1 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 · 1 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 · 1 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 · 1 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.
      Maria Toledo · 1 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.
    Maria Toledo · 1 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 · 1 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 · 1 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 · 1 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 · 1 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.
    Dan · 1 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.
    max giaco · 1 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.
    Faith Arces · 1 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 Saint Girons · 1 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 · 1 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 · 3 months 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 · 1 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 Saint Girons · 1 years ago
      I should add that I am using a gmail inbox
  • To post as a guest, your comment is unpublished.
    Lahiri Shuvo · 1 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.
      Tang Kelly · 1 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 · 1 years ago
    guys i want to save only documents not the email
    • To post as a guest, your comment is unpublished.
      Tang Kelly · 1 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 · 1 years ago
    i am failing to get "run the script" in the rules wizard.
  • To post as a guest, your comment is unpublished.
    judith · 1 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 · 1 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.
      Tang Kelly · 1 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.
    Karl Buck · 1 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.
      Karl Buck · 1 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.
        Tang Kelly · 1 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.
          Karl Buck · 1 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.
    Tony Cheung · 2 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.
    EC · 2 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.
      Tang Kelly · 2 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 · 1 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.
    Casper Delport · 2 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.
      Tang Kelly · 2 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 · 2 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 · 2 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.
      · 2 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 · 1 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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.
        · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 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 · 2 years ago
      I agree with AVNIKA. I have the same problem :-|
  • To post as a guest, your comment is unpublished.
    Eugene · 2 years ago
    Can this rule or similar be applied to a webmail version of Outlook?
  • To post as a guest, your comment is unpublished.
    Bhavesh Luhana · 2 years ago
    Hello,
    I have tried the option 1 (Automatically download Outlook attachments to folder with VBA and rule) and it works perfectly. I have following two queries:

    i) Is there a way outllook download same attachment at multiple share path with reaming the file?
    ii) It also saves attachment with cursor on A1 in eachsheet and sheet1 should be selected. So when you open the file from the path sheet should be open with cursor on A1.

    Thank you so much in advance!!

    Regards,
    Bhavesh Luhana
  • To post as a guest, your comment is unpublished.
    Danny · 2 years ago
    script seems to not be working either, everything is programmed fine, the code etc. and no attachments are pulling through when i run the rule?? running on office 2007? any ideas why??
  • To post as a guest, your comment is unpublished.
    Srinivas · 2 years ago
    Hello Everyone

    The Script is not working for me.I there something else that needs to be done.

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "\\MHO-ITD-SM\Users\smutharaju\Desktop\Ranjith\Outlook Attachments"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub
    • To post as a guest, your comment is unpublished.
      Kalyan · 2 years ago
      [quote name="Srinivas"]Hello Everyone

      The Script is not working for me.I there something else that needs to be done.

      Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
      Dim oAttachment As Outlook.Attachment
      Dim sSaveFolder As String
      sSaveFolder = "\\MHO-ITD-SM\Users\smutharaju\Desktop\Ranjith\Outlook Attachments"
      For Each oAttachment In MItem.Attachments
      oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
      Next
      End Sub[/quote]


      Same here I tried all option I feel script is running but I still don't see files loading in my computer specified path.can some one help me most appreciated
    • To post as a guest, your comment is unpublished.
      Andrew · 2 years ago
      Hi SRINIVAS,

      I believe you need to add the Drive letter to the beginning of your link.

      i.e. C:\users\test\etc

      Hopes this helps!
      Andrew
      • To post as a guest, your comment is unpublished.
        Matt · 2 years ago
        In VBA you also need to add a final backslash at the end of your file path. As follows.


        "D:\OutlookAttachments[b]\[/b]"

        Hope this fixes any issues.
        Matt
        • To post as a guest, your comment is unpublished.
          Dave Brammer · 2 years ago
          HI

          the VBA script worked great for me..... once - never again.

          I even deleted the files in the folder and re ran and nothing.

          What am I doing wrong ? - the rule is running as I get it to display an alert at the same time