/ Forums / Advansys Formativ / Creating Solutions with Formativ / Getting item type / Reply To: Getting item type
February 27, 2006 at 4:44 pm
#7515
Thank you for your enquiry.
You will need to test the ClassName property of the Message object. This web reference is documented in the Introduction to the Formativ Developers Guide.
Here is some sample code to get you started:
iClassName = oMessage.ClassName If InStr(1, iClassName, "GW.MESSAGE.MAIL", vbTextCompare) = 1 Then ' Process Mail message... Elseif InStr(1, iClassName, "GW.MESSAGE.APPOINTMENT", vbTextCompare) = 1 Then ' Process Appointment message... Elseif InStr(1, iClassName, "GW.MESSAGE.TASK", vbTextCompare) = 1 Then ' Process Task message... Elseif InStr(1, iClassName, "GW.MESSAGE.NOTE", vbTextCompare) = 1 Then ' Process Note message... Elseif InStr(1, iClassName, "GW.MESSAGE.PHONE", vbTextCompare) = 1 Then ' Process Phone message... Elseif InStr(1, iClassName, "GW.MESSAGE.DOCUMENTREFERENCE", vbTextCompare) = 1 Then ' Process DocRef message... End If
I hope this helps.
Regards,
Advansys Support