Attachment saving and tracking - PLEASE help!

LTampkins

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hi,

many years ago a developer working for me, created a VBA module that did the following when saving attachments:

  • recorded the file path you saved it to
  • appended the email to say: "the attachment <filename> was saved to <file path> on <date>"
  • and then removed the attachment from the email.7
I cannot figure out how he did it, or if it is even still possible. I have seen some similar examples but these do things like bulk strip out attachments into a pre-determined folder, or just remove the attachments. None of them do exactly what i need. can anyone help?:mad:
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
i have several code samples here:
 

LTampkins

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
yeah I have seen these. in fact this is what i referenced in my post. it saves to a specific folder (OLAttachements) - I want one that simply captures the location i CHOOSE to save the file too as a string and append it to the mail..
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
That's not hard to change. get the browse for folder function (link below) - and change this line
strFolderpath = strFolderpath & "OLAttachments"
to this:
strFolderpath = BrowseForFolder("C:\Users\username\documents\")
(or whatever you are using as the base path)

change this line to add the last slash:
strFile = strFolderpath & strFile
like this:
strFile = strFolderpath & "\" & strFile


 
Top