MarcHenderkes-1688 avatar image
0 Votes"
MarcHenderkes-1688 asked MarcHenderkes-1688 edited

Outlook VSTO Send ActiveInlineResponse E-Mail

As documented in, sending a MailItem that is currently open in the inline response editor is not possible for whatever reason (could anyone please share the reason for this stupid design decision? you can send it manually, after all?).

Now, I'm attempting to write a plugin that sends all selected drafts. This works fine, except for the item currently open in the inline response pane. The way to close this inline response pane as recommended by Microsoft is to call MailItem.Display(). However, even after calling MailItem.Display() in the add-in, attempting to call MailItem.Send() right after, will still result in the same COMException that inline responses cannot be sent. This will be the case no matter how long I wait, until the button_click event has returned. Creating a thread to send the message after causes Outlook to crash.

So - how on earth does one programmatically send the active element? Trigger the send button as a user would? According to previous answers, not possible. Surely the answer can't be "tell the user to manually send that current element"?

Alternatively, any way to close the ActiveInlineResponse immediately so that it is possible to call Send() after? Having the current mail pop up as it's own window with MailItem.Display() would be rather annoying to the user (if it worked, but it doesn't anyway, because it doesn't close it immediately).

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers