I
István Becze
I'm developing a COM add-in for Outlook 2007 using VS 2005 and VSTO 2005 SE.
The add-in has a custom mail item form with an additional textbox where I
allow the user to enter special (i.e. just username without the domain)
e-mail addresses that the COM add-in will turn into fully qualified e-mail
addresses.
My problem is, that Outlook will show a built-in error message "There must
be at least one name or distribution list in the To, Cc or Bcc box." if I
press the send button and there is no recipient entered into any of the above
fields.
I would like to either override this built-in event handler, or insert my
own event handler after the Send button is pressed, but before the built-in
message appears, so that I can format the special addresses and add them to
the recipient list. Unfortunately, both the Application.ItemSend and the
MailItem.Send event fires after the built-in error message, and I didn't find
any other events, that I could use.
Any thoughts will be appreciated.
Thanks,
István
The add-in has a custom mail item form with an additional textbox where I
allow the user to enter special (i.e. just username without the domain)
e-mail addresses that the COM add-in will turn into fully qualified e-mail
addresses.
My problem is, that Outlook will show a built-in error message "There must
be at least one name or distribution list in the To, Cc or Bcc box." if I
press the send button and there is no recipient entered into any of the above
fields.
I would like to either override this built-in event handler, or insert my
own event handler after the Send button is pressed, but before the built-in
message appears, so that I can format the special addresses and add them to
the recipient list. Unfortunately, both the Application.ItemSend and the
MailItem.Send event fires after the built-in error message, and I didn't find
any other events, that I could use.
Any thoughts will be appreciated.
Thanks,
István