Hello,
I have a macro that creates a large number of emails with an attachment. They get saved in the draft folder of an Outllok account, say Account2@mycompany.com, so that they can be reviewed before sending.
I have a total of 3 accounts in Outlook, my personal one, Bering@mycompany.com, set as default, and other two, say Account1@mycompany.com and Account2@mycompany.com
The macro works brilliantly overall, however yesterday there was a problem: the emails appeared to be sent from the correct account, Account2@mycompany.com. However, since I could not find the emails in the outbox of this account, I realised they had been sent from Account1@mycompany.com.
I then realised that by hovering over the account next to the from drop-down list, it actually displays from: Account2@mycompany.com, sent using account: Account1@mycompany.com. In order to have the emails sent from the correct account I had to manually select it from the drop-down list, really annoying.
The code uses .SentOnBehalfOfName = "Account2@mycompany.com". Of course, Account1@mycompany.com does not appear anywhere in my code.
Has anyone experienced a similar issue and found a fix for it? As mentioned in the title, I would like to replicate through VBA the above manual step.
Thank you.
I have a macro that creates a large number of emails with an attachment. They get saved in the draft folder of an Outllok account, say Account2@mycompany.com, so that they can be reviewed before sending.
I have a total of 3 accounts in Outlook, my personal one, Bering@mycompany.com, set as default, and other two, say Account1@mycompany.com and Account2@mycompany.com
The macro works brilliantly overall, however yesterday there was a problem: the emails appeared to be sent from the correct account, Account2@mycompany.com. However, since I could not find the emails in the outbox of this account, I realised they had been sent from Account1@mycompany.com.
I then realised that by hovering over the account next to the from drop-down list, it actually displays from: Account2@mycompany.com, sent using account: Account1@mycompany.com. In order to have the emails sent from the correct account I had to manually select it from the drop-down list, really annoying.
The code uses .SentOnBehalfOfName = "Account2@mycompany.com". Of course, Account1@mycompany.com does not appear anywhere in my code.
Has anyone experienced a similar issue and found a fix for it? As mentioned in the title, I would like to replicate through VBA the above manual step.
Thank you.