/ Forums / Advansys Formativ / Creating Solutions with Formativ / How to test if I am editing an email or viewing a sent item… / Reply To: How to test if I am editing an email or viewing a sent item…

#7411
MA
Participant

Here is some sample code to check the message type of an active view.

dim oMsg
dim iMessageID

‘ Get the message ID of an active view
if (groupwise.throwtoken(“ItemMessageIDFromView()”, iMessageID)) then

if (iMessageID = “X00”) then
msgbox “This is draft message”
else
‘ Check the box type of the message
set oMsg = Client.clientstate.commandmessage
msgbox oMsg.boxtype
set oMsg = nothing
end if

end if

Thanks
MA