GetExchangeUser throw exception if the email is deleted account

Add-in Express™ Support Service
That's what is more important than anything else

GetExchangeUser throw exception if the email is deleted account
How to get the user's email address if the email account was deleted in exchange server ? 
alvin chan




Posts: 34
Joined: 2019-10-07
Posted 13 Oct, 2020 23:12:39 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Alvin,

-2146232828 stands for 0x80131604 which is "Uncaught exception thrown by method called through Reflection". That is, the GetExchangeUser method produced an exception. To find more details, you could try to call this method in VBA and study the Error object.

I don't understand however what you mean "if the email was deleted in exchange server". That is, you test a certain scenario where an email gets deleted? What is the "in exchange server" part? Does it relate to Outlook? Could you please provide more details about the scenario?


Andrei Smolin
Add-in Express Team Leader
Posted 14 Oct, 2020 05:15:57 Top
alvin chan




Posts: 34
Joined: 2019-10-07
Dear Andrei

Thank you for your reply. my scenario is if the email account is deleted account , so i cant get the email address by using GetExchangeUser , the exchange server meant for outlook .

kindly please advise me how to get the email address despite the email account is deleted account.
Posted 14 Oct, 2020 20:47:41 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Alvin,

That is, you try to get the email address of an Outlook account which is deleted?

I won't be able to help you: I don't know the Exchange server related things that deep. I suggest that you ask your question on the Outlook for Developers forum at https://social.msdn.microsoft.com/Forums/en-US/home?forum=outlookdev.

I strongly suggest that you put efforts in describing your scenario in as many details as possible. I still feel like I may not understand it. Was it an Outlook account or Exchange account? What is your task?


Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2020 01:36:16 Top
alvin chan




Posts: 34
Joined: 2019-10-07
Dear Andrei

Sorry for not explaining the details. The scenario is as below

1. I receive an email with subject "hello" from Abc (email : abc@outlook.com )
2. Mr abc resigned from the company ,and so his email -abc@outlook.com removed by the email admin.
3. I try to extract the sender email "abc@outlook.com" from the email with subject "hello" that sent by Mr Abc earlier.
4. I hit the exception that i sent u early.
Posted 15 Oct, 2020 02:27:06 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Alvin,

Thank you for describing the issue.

I suggest that you ask your question on the Outlook for Developers forum at https://social.msdn.microsoft.com/Forums/en-US/home?forum=outlookdev.

I don't know whether it is possible to retrieve that email address in this scenario. Maybe it is still stored somewhere, I don't know.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2020 03:01:24 Top
alvin chan




Posts: 34
Joined: 2019-10-07
Dear Andrei

Noted. Thank you.
Posted 15 Oct, 2020 03:16:23 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
You are welcome.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2020 04:11:14 Top