#6642
Support 1a
Participant

Hi Ralf,

If I understand correctly, you need to determine if the message returned by the Client.ClientState.CommandMessage is currently opened, or close (i.e. just selected in the message list).

If this is correct, then I think you need to use some variation on the code from our previous post to determine if the command message ID is the same as the ID returned from ItemMessageIDFromView().

In other words, in addition to obtaining the CommandMessage object, call ItemMessageIDFromView(), and check that the command succeeds. If it does (which means a message view is opened), compare the message ID returned against the message ID from the CommandMessage as a double check you are using the correct message. Alternatively, you could just use the ItemGetText() methods using the message ID returned from ItemMessageIDFromView() to extract the subject and body from the currently opened view.

I hope this helps.

Advansys Support