'How to close inline response
I want to close current Inline Response to do some behaviors.
I have try this function: OutlookApp.ActiveExplorer().ClearSelection()
but it cannot work under Conversation View and raise exception:
The method you are invoking is invalid for a conversation view
So, what is right way to close Inline Response?
Solution 1:[1]
The Outlook object model doesn't provide any property or method for that.
But you may use the Display method of the MailItem class to display a new Inspector
object for the item. The InlineResponse editor will be closed in that case.
To get an instance of the MailItem
class you need to use the ActiveInlineResponse property of the Explorer class which return an item object representing the active inline response item in the explorer reading pane.
Solution 2:[2]
That functionality is not exposed for the programmatic access. You can try to use Accessibility API to simulate a click on the "Discard" button or you can try Redemption (I am its author) and its SafeExplorer object - it exposes ActiveInlineResponseDiscard
method:
set sExplorer = CreateObject("Redemption.SafeExplorer")
sExplorer.Item = Application.ActiveExplorer
sExplorer.ActiveInlineResponseDiscard
Solution 3:[3]
Simply deleting the Response rather than discarding will work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eugene Astafiev |
Solution 2 | |
Solution 3 | robyaw |