Cannot autosave attachments from Outlook.

Butkevich, Wally 20 Reputation points
2024-07-10T15:57:35.65+00:00

Hello,

I am hoping someone has a fix or can offer help.

I am trying to get some attachments I receive to automatically download to a local folder. I have added the following script:

  • Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
  • Dim objAtt As Outlook.Attachment
  • Dim saveFolder As String
  • saveFolder = "c:\temp"
  • For Each objAtt In itm.Attachments
  • objAtt.SaveAsFile saveFolder & "" & objAtt.DisplayName
  • Set objAtt = Nothing
  • Next
  • End Sub

When I set up the rule, I am not getting the option to run the script. I am running Outlook 365.

Any help is appreciated.

Outlook
Outlook
A family of Microsoft email and calendar products.
3,540 questions
0 comments No comments
{count} votes

Accepted answer
  1. SokiGuo-MSFT 26,086 Reputation points Microsoft Vendor
    2024-07-11T05:39:11.61+00:00

    Hi @Butkevich, Wally

    Welcome to our forum!

    please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client, and very little is known about scripts.

    As far as I know, the Run a script option in the Outlook client creation rule has been disabled by the security update. More information, see: https://www.slipstick.com/outlook/rules/outlook-run-a-script-rules/.

    (Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)

    In addition, for questions related to Outlook development and scripting, you can post to this Office Development-Q&A tab for more professional advice.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

0 additional answers

Sort by: Most helpful