Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem, strFolderPath As String) Dim oAttachment As Outlook.attachment Dim sSaveFolder As String Dim fso As New Scripting.FileSystemObject Dim bName As String Dim sSaveFolder As String 'Checking that path ends in \ If Right(strFolderPath, 1) = "\" Then ' fall through Else: strFolderPath = strFolderPath & "\" End If sSaveFolder = strFolderPath For Each oAttachment In MItem.Attachments ' change the file name with the index 'Debug.Print "DisplayName: " & oAttachment.DisplayName 'Debug.Print "FileName: " & oAttachment.FileName 'Debug.Print "Pathname: " & oAttachment.PathName ' get the filename (no extension) bName = fso.GetBaseName(oAttachment.DisplayName) ' rename the file with no extension using the index as the order ' to be merged at a future date bName = oAttachment.Index & "-" & bName ' put the extension back on bName = bName & "." & fso.GetExtensionName(oAttachment.DisplayName) ' save the file with the new name oAttachment.SaveAsFile sSaveFolder & bName Next End Sub