How do I get the mail object in an inline response

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

How do I get the mail object in an inline response
How do I get the mail object in an inline response 
hundun wds




Posts: 13
Joined: 2020-05-12
How do I get mail objects in an inline response outside the explorerinlineresponse event?



How to get the replied email object in the reply email editing interface?
Posted 29 May, 2020 04:53:43 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Hundun,

See Explorer.ActiveInlineResponse and Explorer.ActiveInlineResponseWordEditor:
- https://docs.microsoft.com/en-us/office/vba/api/outlook.explorer.activeinlineresponse
- https://docs.microsoft.com/en-us/office/vba/api/outlook.explorer.activeinlineresponsewordeditor


Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2020 06:14:39 Top
hundun wds




Posts: 13
Joined: 2020-05-12
Hello, I read the official Microsoft document you sent, but I found that in outlook, the Explorer object has no activeinlineresponsewordeditor attribute


Another question is how to get the original email object after the user clicks reply or forward the email?
Posted 29 May, 2020 06:26:34 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
hundun wds writes:
but I found that in outlook, the Explorer object has no activeinlineresponsewordeditor attribute


These properties were introduced in Office 2013. In looks like you use interops for an earlier Office version.

hundun wds writes:
Another question is how to get the original email object after the user clicks reply or forward the email?


You can connect to events of the original email and handle the Reply/Forward events.


Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2020 07:04:44 Top
hundun wds




Posts: 13
Joined: 2020-05-12
But I want to get the original email of the current reply email in the click event of another button
This button is in the edit interface of new mail
Posted 29 May, 2020 07:17:06 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Hundun,

At http://www.outlookbanter.com/add-ins-outlook/32424-get-parent-message-original-response.html, I see the following text written by Ken Slovak - a guru in Outlook development:

You can always get ConversationTopic and ConversationIndex from the response message. ConversationTopic would remain the same as the original message and ConversationIndex would be longer from the new Windows time struct appended to the previous ConversationIndex. That would allow you to find the original message. If you store the original's parent folder you know where to look.



Andrei Smolin
Add-in Express Team Leader
Posted 01 Jun, 2020 01:35:54 Top
hundun wds




Posts: 13
Joined: 2020-05-12
Thank you for your answer. It inspires me a lot. Can I ask you another question?
How do I add a custom message header?
Posted 02 Jun, 2020 04:52:24 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Hundun,

Please start a new topic whenever you have a new question. This helps other developers find it.

hundun wds writes:
How do I add a custom message header?


See https://www.add-in-express.com/forum/read.php?FID=5&TID=14156.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2020 05:04:02 Top
hundun wds




Posts: 13
Joined: 2020-05-12
Thank you for your patience, it has been a great help to me, but I have a new question to ask you...
In the way you provided, I have successfully added a custom message header.
I want to know how to display this property in the mail view list?I don't want to foreach the mailing list
Posted 02 Jun, 2020 05:36:31 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Hundun,

Custom message header is added to the message before it is sent in order for your add-in (or some other program) on the receiving end to handle the header by retrieving your information from the received email.

What you see in the *current* Outlook view are fields - of the ViewFields type. They reflect built-in properties (such as Subject). You can create a custom field to reflect a custom property - of the UserProperty type - added to the item. Pay attention to ViewFields when reading https://docs.microsoft.com/en-us/office/vba/api/outlook.tableview. You use this way to control the field.

If you only want to show it and let the user decide what to do with it after that, specify the AddToFolderFields parameter of the MailItem.UserProperties.Add() method; see https://docs.microsoft.com/en-us/office/vba/api/outlook.userproperties.add.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2020 05:55:22 Top