Search code examples
c#outlookvstooutlook-addinoffice-addins

Outlook VSTO - Error while sending appointment from a modal form


I have a modal form that allows user to make custom selections to generate a message body. The send button on the modal form should save and send the invite. However I get the following error on the line of code that sends the appointment

"Because a modal form is open in outlook, this item cannot be sent"

Is there a way to send the invite without having to change to a non-modal form?


Solution

  • Does clicking Send close your modal form? Try to close the form first, then call Send.

    If not, you can also postpone calling Send until your form closes. If the call fails, you can show your form again.