Showing Removed Attachments in Thread

Tomas

Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Operating system::    Windows 10
Outlook version:     Outlook 365
Email type or host:    Exchange Online

In Lotus Notes, if you replied to an e-mail that had an attachment, it would remove the attachment and insert text indicating the name of the attachment that was removed. For example, the following would appear at the end of the thread: [attachment “Portfolio.doc” deleted by Meaghan/Company].

Is there a way to do this in Outlook with VBA (Private Sub)?

Many thanks in advance.
 
Yes, you can do it using VBA. I don't have a sample that does exactly that, but it is possible.

Note that replies never include the attachment - the VBA is generally to remove attachments to save mailbox space. But if you wanted to add that to replies, it would be possible by tweaking the following code to insert the file name - or creating one that added the file name that would be used instead of the Reply button (so you only use it when needed).

Because this is automatic when you hit Reply, if using this method, you would probably want to limit it to doc, xls, pdf formats.


(Have not seen anyone mention that lotus feature in many years.. or actually mention lotus notes. :))
 
Yes, you can achieve this in Outlook using VBA. You’ll need to write a script that removes attachments from the reply while inserting a note about the deleted file. Below is a simple VBA snippet to get you started:

vba
<span>Private Sub RemoveAttachmentsAndNotify(Item As MailItem)<br> Dim att As Attachment<br> Dim attachNote As String<br> attachNote = vbCrLf &amp; "[Attachments deleted: "<br><br> If Item.Attachments.Count &gt; 0 Then<br> For Each att In Item.Attachments<br> attachNote = attachNote &amp; att.FileName &amp; ", "<br> Next att<br> attachNote = Left(attachNote, Len(attachNote) - 2) &amp; "]"<br> Item.Body = Item.Body &amp; attachNote<br> While Item.Attachments.Count &gt; 0<br> Item.Attachments.Remove 1<br> Wend<br> End If<br>End Sub<br></span>
Assign this macro to trigger before sending a reply. Hope this helps!
 
Hello, many thanks for your replies. I tried to run your code, unfortunatelly I still get an error message Compile error:
Expected: end of statement,
beginning at line attachNote = vbCrLf &amp "[Attachments deleted: " (red marked). Could you please check your code? Thank you again.
 
Similar threads
Thread starter Title Forum Replies Date
U Showing images on company newsletter using Mailchimp Using Outlook 3
O Outlook 2024 not showing that messages are replied to or forwarded Using Outlook 3
D MS365 Subscription renewal showing different dates Using Outlook 5
D Amazon and some other emails not showing in Preview Pane Using Outlook 10
A Quick Access Toolbar Not Showing Description Using Outlook 0
U Outlook 2021 not showing contact cards in Searches Using Outlook 1
T Outlook 2010 Sub accounts not showing new emails in Inbox Using Outlook 4
e_a_g_l_e_p_i Outlook 2021 all appointments not showing in calendar Using Outlook 2
J Outlook 365 Emails showing as links and text only Using Outlook 4
M On behalf of not showing on calendar for boss Using Outlook 1
C Icons (arrows) not showing on emails forwarded or replied to Using Outlook 8
D Outlook launch email showing new unread email in reading pane Using Outlook 11
glnz O365 - How to send from acct 2 but showing email name from acct 1 as From - alias? Using Outlook 0
B Spam folder not showing in Outlook Using Outlook 5
K UDF with formula not showing on Calendar custom view. Outlook VBA and Custom Forms 0
J Sent Items Folder NOT Showing Correct From Email Address Using Outlook 0
J Outlook Reply > From > Other Email Address... > Address Not Showing in Sent Items... From Email Outlook VBA and Custom Forms 0
O How to prevent CC from showing when creating a new mail? Using Outlook 1
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
G icloud pictures not showing in Outlook 365 Using Outlook 0
C Outlook Autocomplete suggestions showing wrong person's name against an email address Using Outlook 0
B When sending an email, I am showing 2 of my address's Using Outlook 1
K Outlook.com is not showing, or finding via search, all my Contacts (People) Using Outlook 0
M Sent mail not showing in my sent folder Using Outlook 9
M Inbox not showing to deliver new email to this account Using Outlook 3
O Reminder due end of August is showing up now Using Outlook 2
Rupert Dragwater Deleted email address keeps showing up in reply Using Outlook 12
Z Outlook for G Suite emails showing wrong dates Using Outlook 4
C Outlook 2016 cannot delete, email showing in root Exchange Server Administration 5
Z Outlook 2013 Gmail IMPA emails not showing dates only showing times Using Outlook 1
V Spam folder not showing in Outlook Using Outlook 4
3 New emails not showing up Using Outlook 5
M attached images not showing in text area Exchange Server Administration 0
G Outlook 2016: reply icon not showing when replied from mobile Using Outlook 3
W Showing more months in the Calendar nav pane Using Outlook 10
A Custom form not showing when recurrence is set for a meeting Using Outlook 0
A Updated custom form not showing with old items Outlook VBA and Custom Forms 2
B Emails from a single gmail address not showing in Outlook 2016 Using Outlook 1
H Outlook Images showing as hyperlinks Using Outlook 3
K Outlook 2013 Recurring Tasks Not Showing Complete Outlook.com Using Outlook.com accounts in Outlook 1
R Tasks showing up in inbox? Using Outlook 15
P Newly created IMAP subfolders not showing up on email clients away from computer. Using Outlook 3
0 Emails showing up in Search results, but not visible otherwise Using Outlook 3
OnCall "You replied to..." not showing up Using Outlook 1
J Calendar search failing & wrong indexlocation showing..OL2010 Using Outlook 3
A Calendar List View Showing Week Number Using Outlook 1
M Not All Outlook.com Calendars Showing in Outlook.com Using Outlook.com accounts in Outlook 18
M Outlook.com Group Contacts Not Showing in Outlook Using Outlook.com accounts in Outlook 2
J Other user's calendar view showing as busy in 2007 & 2013 from my account Using Outlook 1
L Showing @live account in outlook 2013 calendar as private appointment Using Outlook 1

Similar threads

Back
Top