Outlook.Application.ItemSend

  • Thread starter Thread starter Johnny E Jensen
  • Start date Start date
J

Johnny E Jensen

Hello Group

I've created an application that uses outlook for creating emails. I wrote a
class to handle all outlook things.
The appl. is written with VS2005 C#, and I'll use Outlook 2003

When i instanciate this class like MSOutlookClass objOutlook = New
MSOutlookClass();
the class create the Outlook.Application and Outlook.Namespace, also i add
an event - the Outlook.Application.ItemSend Event.

I have a method like
Public Void CreateSimpleMail(string toname, string tomail)
{
Outlook.MailItem _objMail =
(Outlook.MailItem)_objApplication.CreateItem(Outlook.OlItemType.olMailItem);
objMail.To = toname + " (" + tomail + ") ; ";
objMail.Display(false);
}

This brings up the create new email form. The user now types the mail and
click the send email button. This fires the Event
Outlook.Application.ItemSend.

In this Event I'll check that the item is an MailItem. And something are OK
because i can read the email adr., subject ect.from the object Item Param,
but not the EntryID value and that i'll need. Do I have to look into another
event or write some delay or what?

Kind regards

Johnny E Jensen
 
Johnny E Jensen said:
I've created an application that uses outlook for creating emails. I
wrote a class to handle all outlook things.
The appl. is written with VS2005 C#, and I'll use Outlook 2003

Ask in a programming group like
news://msnews.microsoft.com/microsoft.public.outlook.program_addins or
news://msnews.microsoft.com/microsoft.public.developer.outlook.program_addins
 
An EntryID won't be created until the item has been added to SentItems. Save
the item before it's sent to be able to get an EntryID. However, if the item
is added to SentItems then EntryID may change, depending on the store
provider. There's no guarantee that this GUID will remain the same after an
item is moved, even within the same store (although for the PST store
provider the EntryID usually remains the same).
 
Back
Top