After playing around for some time, I have found the error by my self 😉
It seems to be an error in the OBJAPI of GW6.5 SP1 !?
It’s not possible to access the per-defined categories,
but user-defined will work fine.
If you select a message with a pre-defined categorie and start the
following applet you will get an error in line 13. If you set an
user-defined categorie everything works fine.
Also, if you set a pre-defined AND a user-defined categorie, the
count of categories will not be correct. !?
Sub Main(Client, GWEvent)
Set Msg = Client.ClientState.CommandMessage
‘- how many categories are set?
iCntCat = Msg.Categories.Count
msgbox (“#Categories: ” & iCntCat)
‘- only read categories if there is one set
If iCntCat > 0 Then
‘- rad out the 1st category:
set oAppCat = Msg.Categories.Item(1)
‘- get the name of that category:
sAppCat = oAppCat.Name