[SOLVED] Auto remove [EXTERNAL] from subject

pacnwtexan

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Recently, my main customer has added a server based [EXTERNAL] flag to their (our) emails. This obvously happens on the customer side when responding but is creating a nightmare for grouping and searching on our side.

I am looking for a way to edit [EXTERNAL] out of the subject line upon receipt? I have seen mentions of VB or C script options but this is too far advanced.

Is there a way to do this via rules?

Is there a custom rwz site that people can recommend?

Sent from my SM-N975U using Tapatalk
 

pacnwtexan

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
No, you can't do it using rules. You need to use a macro, which only works in Outlook desktop.

So I'm not on 365 so I imagine desktop. So create a macro to open and auto tab (?) To the subject and search and replace?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
If you are using Outlook 2013, its the desktop software and a macro will work.

I swear I had a macro that removed the keywords (your aren't the first to complain about it). I can put one together - do you want to remove it on all incoming messages or only when you reply?
 

pacnwtexan

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
If you are using Outlook 2013, its the desktop software and a macro will work.

I swear I had a macro that removed the keywords (your aren't the first to complain about it). I can put one together - do you want to remove it on all incoming messages or only when you reply?

I would like to remove specifically [EXTERNAL] from the subject line as emails arrive.
 

hmuheed

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server 2013
is it do able, i need to remove the tag [EXTERNAL] from the subject line or remove prefix and add to suffix instead.
cos the sorting email have been pain now.
 

pacnwtexan

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Yes, sorting and the history lookup is completely out of whack since our main client began adding EXTERNAL to the subject. Someone, anyone?

Sent from my SM-N975U using Tapatalk
 

pacnwtexan

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Recently, my main customer has added a server based [EXTERNAL] flag to their (our) emails. This obvously happens on the customer side when responding but is creating a nightmare for grouping and searching on our side.

I am looking for a way to strip [EXTERNAL] out of the subject line upon receipt? I have seen mentions of VB or C script options but this is too far advanced.

Is there a way to do this via rules?

Is there a custom rwzRulessite that people can recommend?

Sent from my SM-N975U using Tapatalk
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Rules will not work - you need to use a macro.

This macro can do run on all messages in the folder -

Remove: lString = InputBox("Characters to be deleted from the LEFT. Include brackets and spaces!")

Update this block - it will only update if there is a match but the if/end if could be removed.
iItemsUpdated = 0
For Each aItem In mail.Items
if left(aitem.subject,11) ="[EXTERNAL] " then
aItem.Subject = Replace(aitem.subject,"EXTERNAL] ", "")
iItemsUpdated = iItemsUpdated + 1
End if
aItem.Save
Next aItem


I did not test it, so its possible i messed up. Hope not. :) if there is more than one space (or no space) following [external], that can be adjusted - and if some use upper and some use mixed case, we can fix that using lcase. I'll post a working macro (but i'm sure i have one that already does that. Just gotta find it. :( )
 

pacnwtexan

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Will this work if there is only sometimes an [External] flag? Don't want to strip content from the subject itself... if that then this
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yes, it will. Assuming I did not make a mistake in the code, it will check to see if the subject has [external] at the beginning and if so, removes just external - by replacing it with nothing. If someone emails you with a subject of 'how do i remove [external]' it will not remove it, unless they are external and the subject is '[external] how do i remove [external] ' <== space after [external], which matches the pattern in replace. In this case, it would remove both.
 

Sherwin23

New Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Rules will not work - you need to use a macro.

This macro can do run on all messages in the folder -

Remove: lString = InputBox("Characters to be deleted from the LEFT. Include brackets and spaces!")

Update this block - it will only update if there is a match but the if/end if could be removed.
iItemsUpdated = 0
For Each aItem In mail.Items
if left(aitem.subject,11) ="[EXTERNAL] " then
aItem.Subject = Replace(aitem.subject,"EXTERNAL] ", "")
iItemsUpdated = iItemsUpdated + 1
End if
aItem.Save
Next aItem


I did not test it, so its possible i messed up. Hope not. :) if there is more than one space (or no space) following [external], that can be adjusted - and if some use upper and some use mixed case, we can fix that using lcase. I'll post a working macro (but i'm sure i have one that already does that. Just gotta find it. :( )

Diane--
Your instructions, here, are perfect. I created a macro that stripped [EXTERNAL] from the subject line. However, is it truly removed or just hidden? I use Exquilla and Davmail to connect to Exchange and the prepended [EXTERNAL] warning is still visible; in the same email in which it is not visible in Outlook. Thunderbird shows the source code of the email-- [EXTERNAL] is not in the message source binary. What am I missing about this prepended warning?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
It is removed from the subject field but is still in the internet headers.

If you use conversation view, the original version is the conversation group header.
 

Sherwin23

New Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
It is removed from the subject field but is still in the internet headers.

If you use conversation view, the original version is the conversation group header.

Thank you for the update.
I'm guessing that there is no way to remove the [EXTERNAL] warning completely (subject field and internet headers--conversation header) so that Thunderbird does not see it all. Or is there a way to do this?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
No, you can't rewrite the header by the time its in outlook. You can do it at the server level, if you use exchange. And the admin agrees.

Conversation can be changed by redemption, I think, but only in outlook's property, not in the header.
 

lpcysmi

New Member
Outlook version
Outlook 2019 64-bit
Email Account
Office 365 Exchange
1614258146770.png



Hi, your macro works when I open the email, but it does not work for me on the emails list and the main reason I want to remove it is so the conversation look, works seamlessly.....

also is there a way for the macro to run in the background every certain period without notifing me the changes were made?

Regards
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Remove this if you don't want the count:
MsgBox iItemsUpdated & " of " & mail.Items.Count & " Messages Updated"

Outlook doesn't have a timer function but you can use reminders to trigger a macro -

The difference in this screenshot - is Conversation view - the message list pulls the subject from the thread topic - you only changed the subject. I will double check to see if the topic is editable.

2021-02-25_8-47-41.png


This is from the header of a message in my inbox - in my case, external was the #3 message in the thread. The thread groups properly even with the External tag - because outlook uses other properties for grouping. (Everyone in the thread uses office 365 but are in different organizations - this helps with threading.)
Subject: RE: [EXTERNAL] RE: the subject
Thread-Topic: [EXTERNAL] RE: the subject

Editing the subject does not remove External from those lines in the header but it broke the threading and the one I removed External from does not group with the others in the thread.
 
Similar threads
Thread starter Title Forum Replies Date
A Auto Insert of filename when selecting 'Remove Attachment' Using Outlook 1
T Outlook 2010 manually actioning of send and receive? remove auto actioning Using Outlook 4
J Outlook's auto time zone update for meeting requestsHow to REMOVE or DISABLE? Using Outlook 1
H remove auto added signature macro Outlook VBA and Custom Forms 1
DDB VBA to Auto Insert Date and Time in the signature Outlook VBA and Custom Forms 2
V Auto-complete stopped working Using Outlook 4
D auto forward base on email address in body email Outlook VBA and Custom Forms 0
M Replyall macro with template and auto insert receptens Outlook VBA and Custom Forms 1
R Auto Forwarding with different "From" Outlook VBA and Custom Forms 0
P auto-complete is hopelessly broken Using Outlook 0
R Auto Assign Category colours to Incoming Emails based on whom the email is addressed Outlook VBA and Custom Forms 3
C Auto Run VBA Code on new email Outlook VBA and Custom Forms 1
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
V Auto-Submitted: auto-replied in header Using Outlook 0
R Auto display of new email does not work on non-default account Outlook VBA and Custom Forms 0
B Outlook 2016 Auto-archive creates new folder Using Outlook 3
J Edit auto-complete list in Outlook 2016+/365? Using Outlook 0
P Auto assign shared mailbox Outlook VBA and Custom Forms 1
M Outlook 2010 Problem with OutLook 2010 32 bit, after Windows Auto Update Using Outlook 3
Z Add text to auto-forwarded e-mail Outlook VBA and Custom Forms 4
N Disable Auto Read Receipts sent after using Advanced Find Using Outlook 4
Q Prompt button to auto turn on Out of Office Outlook VBA and Custom Forms 3
P Auto Insert Current Date or Time into Email Subject Outlook VBA and Custom Forms 2
S Messages moved / deleted by auto-archive are not synchronized to exchange Exchange Server Administration 8
B Outlook 2010 is Auto Purging when not configured for that Using Outlook 1
M VBA to auto forward message with new subject and body text Outlook VBA and Custom Forms 8
A Auto Accept Meetings from the General Calendar Using Outlook 3
R auto send email when meeting closes from a shared calendar only Outlook VBA and Custom Forms 2
S auto-mapping mailboxes in outlook impacting an ost file? Exchange Server Administration 2
M Auto expand Distribution List Before Sending Email Outlook VBA and Custom Forms 1
M Auto-export mail to Excel Outlook VBA and Custom Forms 2
Ms_Cynic Auto-pasting email content in calendar appt? Using Outlook 2
R How Do I insert images in and Auto Reply Using Outlook 3
S Received mail as part of DL, need to auto-CC the same when replying Outlook VBA and Custom Forms 5
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 10
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 0
P Auto scroll to specific folder in Folder Pane Outlook VBA and Custom Forms 3
C Auto categorize duplicate subjects Outlook VBA and Custom Forms 11
N Auto-complete - block select emails Using Outlook 3
C Auto save outlook attachments when email is received Outlook VBA and Custom Forms 1
J HELP- Rule to auto strip prepend from external emails Using Outlook 0
S BCM Auto Backup Data and Customizations BCM (Business Contact Manager) 6
G Auto accept meeting request for non primary account Outlook VBA and Custom Forms 1
J Outlook Rules - Changing auto-submit address in multiple rules, according to rule name Outlook VBA and Custom Forms 0
E Outlook Form - Voting Responses Not Auto Processing If Form Contains Any Code Outlook VBA and Custom Forms 0
J Auto Forward - Include Attachment and change Subject depending on original sender Outlook VBA and Custom Forms 3
K Extract email address from body and auto-reply outlook Using Outlook 1
S Auto move search results to folder Outlook VBA and Custom Forms 0
E Outlook 2010 disable date auto-complete Using Outlook 2
C Auto subject,name,email,deferred Using Outlook 2

Similar threads

Top