Consulting

Results 1 to 2 of 2

Thread: Help on Outlook Attachment Prompt to save which folder

  1. #1
    VBAX Newbie
    Joined
    Jul 2023
    Posts
    1
    Location

    Help on Outlook Attachment Prompt to save which folder

    Hi there!

    Any coders know what syntax to input for the sSaveFolder folder location so that every time when creating a new rule through Rule Wizard it will prompt which local folder location you want to save to? Instead of creating multiple modules for to be save in different folders.

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "C:\Users\Profile 1\Downloads\Testing"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub

    Thanks in advance!

  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    Open File System Object file picker dialog. This is a common topic. Here is one reference https://stackoverflow.com/questions/...-separate-code
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •