Unusual behaviour in setting Sender (Outlook 2016)

Not open for further replies.

Ed Sheehan

Outlook version
Outlook 2016 32 bit
Email Account
Outlook.com (as MS Exchange)
I have two email accounts set-up. An Outlook Exchange based one, and a MAPI based one linked to my personal domain hosting service.

I created the following simple script to all default new emails to always using the personal account as the sender.

The first new email persists with using the Exchange based account, but all subsequent emails (so long as the first email remains open) work perfectly. As soon as I close the first email, the next one reverts back to the Exchange account. Again, all subsequent new emails default correctly.

What am I missing?

' Program: Sender
' Description: Force sending account to a specific item when creating new emails
' Called by: Outlook events

' Create evnt monitoring object
Dim WithEvents colInsp As Outlook.Inspectors

' Begin monitoring with application startup
Private Sub Application_Startup()
Set colInsp = Application.Inspectors
End Sub

' Event handler
Private Sub colInsp_NewInspector(ByVal Inspector As Inspector)
If Inspector.CurrentItem.Class = olMail Then

' Create object to hold mail item
Dim objMail As Outlook.MailItem
Set objMail = Inspector.CurrentItem

' Overide sender account with the first account in profile
If objMail.Sent = False Then
objMail.Sender = Outlook.Session.GetAddressEntryFromID("812B1FA4BEA310199D6E00DD010F5402000000804500640020005300680065006500680061006D00000053004D005400500000006500640040006E006100760065006D002E0063006F")
End If
End If
End Sub
Last edited by a moderator:
I believe the problem is that Exchange is a pig and always wants to be the sender. <g> I'm seeing the same behavior. What's interesting is the entry id is comping up with your name and address - i will edit the entry id in your sample to remove it.
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Unusual calendar issue Exchange Server Administration 0
C Unusual Signature & Spell Check Query Using Outlook 1
B Strange MAPI/Exchange/IMAP behaviour in OL 2016 under10.0.19044.2006 Using Outlook 0
L Outlook/O365 "sent on behalf" behaviour Exchange Server Administration 1
M Expected behaviour of recurring appointments? Using Outlook 2
Justo Horrillo It's possible to modify the behaviour of the conversation option? Using Outlook 2
R Outlook 2013 - Odd Sync behaviour Using Outlook 1
wallisellener BCM - Weird behaviour BCM (Business Contact Manager) 20
U Odd behaviour for auto-receive Using Outlook 2
J Using Group Policy to control Outlook security/attachments behaviour Outlook VBA and Custom Forms 1
T Outlook 2003 Categories behaviour Outlook VBA and Custom Forms 1
S Strange Behaviour of Explorer Object. Outlook VBA and Custom Forms 1
V Setting up Outlook 2021 on new computer Using Outlook 2
AlphonseG Outlook 365 Outlook Crashes on setting SaveSentMessageFolder Outlook VBA and Custom Forms 4
R Outlook 2021 Having problem setting up outlook 2021 with windows 11. I have 3 gmail accounts and I want the 3 gmail, emails to merge into the same outlook input. Using Outlook.com accounts in Outlook 0
e_a_g_l_e_p_i Outlook 2010 Help setting up Gmail account in Outlook 2010 Using Outlook 3
P OWA Settings->Calendar->Events from Email; Setting changes do not hold Using Outlook 1
Marc2019 Setting up an Outlook Account on Mac Os 10.6.8 Outlook 2011 Using Outlook 1
L Outlook Office 365 client: won't remember my setting File, not to collapse ribbon Using Outlook 2
M Where is the setting to *turn off* open calendar in a new window? Using Outlook 3
llama_thumper Setting up forwarders on Exchange server Exchange Server Administration 0
B Setting rules Using Outlook 1
C iCloud Setting missing Outlook tab and Outlook missing the iCloud refresh button Using Outlook 4
B Setting defaults Using Outlook 2
C need help setting up outlook first time Using Outlook 1
P Reading Pane (Reading Pain?) Default Setting Using Outlook 1
W Setting up a custom form Outlook VBA and Custom Forms 2
mctabish Setting "Reply To" based on inbox Outlook VBA and Custom Forms 2
R Setting font and color used when replying to an email Outlook VBA and Custom Forms 3
M Setting flag follow up for next business day Outlook VBA and Custom Forms 1
Jennifer Murphy Equations don't comply with style setting to left justify Using Outlook 0
J Setting default address book Using Outlook 0
N Does a Shared Folder Policy override a Digital Signature Setting for macros? Outlook VBA and Custom Forms 6
Diane Poremsky Setting up an Outlook.com IMAP account Using Outlook 0
Diane Poremsky Setting the default Country for Outlook Contacts Using Outlook 0
H Need help setting up GetFolderPath-Makro with Vodafone IMAP Mail-Account Outlook VBA and Custom Forms 0
Diane Poremsky Adjusting Outlook's Zoom setting in Email Using Outlook 0
O Setting default format for composing/replying to emails Using Outlook 3
B Outlook Calendar/setting appointments Using Outlook 1
Diane Poremsky Adjusting Outlook's Zoom setting in Email Using Outlook 0
Diane Poremsky Setting Custom Reminder Times Using Outlook 0
A Can't stop Outlook.com from setting reminders on appointments? Using Outlook.com accounts in Outlook 3
A Setting RULES with more than one condition in MS OUTLOOK Using Outlook 6
L Setting up my PA's Outlook Using Outlook 7
E Need Help on Setting up a repeated Reminder on Task with Reoccurence Every Year Using Outlook 6
N "Instant Search" setting a default view Using Outlook 3
K Setting Default Email Address for Meeting Replies Using Outlook 3
S Setting up Outlook 2010 to work with custom domain outlook.com account BCM (Business Contact Manager) 3
D Setting defult "Show a room list" Using Outlook 0

Similar threads