> Try calling Recipients.ResolveAll and perform the send only if it returns True.
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
>
http://www.turtleflock.com/olconfig/index.htm> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
>
http://www.outlookcode.com/article.aspx?id=54>
> "bstrum" <bstrum[ at ]discussions.microsoft.com> wrote in message news:078B8121-29D3-497C-A7FA-B635B2E6F6BB[ at ]microsoft.com...
> >I am getting an exception thrown with our c# outlook addon installed on one
> > machine running Office 2003. The exception is thrown when I try to call Send
> > on a mail item that I have programatically created. The code looks like this:
> >
> > Note: This code uses late binding.
> >
> > // -- in the Item_Send event --
> > MSOutlook.MailItem mi; // assume initialized from the Item_Send argument
> >
> > // create the new mail item that will be programatically sent
> > object otmp = mi.Application.CreateItem(MSOutlook.OlItemType.olMailItem);
> > MSOutlook.MailItem m = (MSOutlook.MailItem)MO.COMWrapper.Wrap(
> > otmp,
> > typeof(MSOutlook.MailItem));
> > m.BodyFormat = MSOutlook.OlBodyFormat.olFormatHTML;
> > m.To = mi.To;
> > m.Subject = "Some subject";
> > m.Body = "Test Body";
> > m.Save();
> > m.Send(); // throws exception on one client computer
> >
> > The actual exception thrown is
> > "Exception has been thrown by the target of an invocation."
> >
> > I have tried everything I can to duplicate the exception in our test
> > environment to no avail. Any ideas why something as simple as this would
> > throw an exception?
> >
> > Thank you,
> >
> > Ben Strum
> > ThinkTron Corporation
>