GDFord
2011-09-26 21:54:27 UTC
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?
function mytest()
local oOutlook, oExp, oItem, nClass, tReceived
oOutlook := TOleAuto():New( "Outlook.Application" )
oExp := oOutlook:ActiveExplorer
oItem := myOlExp:Selection:Item(1)
// oItem:Class 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
mail item.
I can't get the class property to work.
Can someone please help me determine what kind if items they are?
function mytest()
local oOutlook, oExp, oItem, nClass, tReceived
oOutlook := TOleAuto():New( "Outlook.Application" )
oExp := oOutlook:ActiveExplorer
oItem := myOlExp:Selection:Item(1)
// oItem:Class 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