I need to get the class of an item in Outlook so I know if it is a valid mail item.
I can't get the class property to work.
Can someone please help me determine what kind if items they are?
[code]
function mytest()
local oOutlook, oExp, oItem, nClass, tReceived
oOutlook := TOleAuto():New( "Outlook.Application" )
oExp := oOutlook:ActiveExplorer
oItem := myOlExp:Selection:Item(1)
// This is supposed to return the class of the item object.
// if oItem:Class = 42 then it should be an email object but it returns another object.
nClass := oItem:Class
tracelog( nClass )
// If the current item is a regular email then the following line works.
// If the current item is an undeliverable message or something other than mail thenthe following line fails
tReceived := oItem:ReceivedTime
return nil