View Single Post
  #8  
Old May 14th 10, 07:44 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default MailItem.SaveAs not working

You need to check the item's MessageClass property, which is a string. If
you are doing that in a procedure or event handler where the item is an
Object you would do that using reflection.

If you use Class, which won't work for you correctly, you will need to try a
cast to MailItem, if that fails try a cast to ReportItem and so on.
Personally I'd be using MessageClass myself.

I'd get MessageClass and use string.StartsWith() to see if the MessageClass
starts with "REPORT".

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Chris" wrote in message
...
Ken,

The Class I was referring to is the
Application.ActiveExplorer.CurrentFolder.Items.Ite m(I).Class. I had a
return
of 43.

I do not know how to utilize MessageClass to isolate as it seems to call
the
delivery receipt IPM.NOTE according to what was outputted to the
messagebox
and not as what you had below. I am using Outlook 2007.

Chris


Ads