MailItems created in a VB Add-In, show up as Expired with Low Importance

  • Thread starter Thread starter Leon
  • Start date Start date
L

Leon

I've been put in charge of debugging a COM add-in that is used to sync
Outlook 2003 with an external data store. For an a item of type
Outlook.MailItem, I set a number of properties such as subject and body and
then call the .Save method of the MailItem object inside the VB code. That
part works fine however, when I look at the Inbox folder, the messages have
lines through them. If I open an email, there is a grey box with the
following message: "This message expired on Saturday, December 30, 1899
12:00 AM". The message also has its Importance set to Low. If I right click
on the message in the Inbox and go to Options, I can change the "Importance"
and "Expires After" values, but I cannot figure out how to get to these
properties programmatically as they don not seem to be exposed through the
object model.

Any help would be greatly appreciated.

Thank You very much, Leon
 
Looks like your code explicitly sets MailItem.ExpiryTime to 0 (which is Jan
1, 1900)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top