-
Topic
-
Hi,
Groupwise 6.5 SP1, Formativ V1.6.0.8
My applet will set a filter to the mailbox and walk throught
the results. By accessing the category of a message I get an
strange error. It’s not easy to reproduce it, so I hope the
following will help:1. Setup 3 posted tasks
2. Give the first one a userdefined category,
the second no category and
the third a userdefined category different to the first one
3. start the following applet
(I have reduced it, so it makes no sense, just showing the error)The error that I get:
The first messagebox shows the correct category for the first task, the second
one is empty, which is also ok, but the third will show the category of
the first! message.
Now set a category to the second task and start the applet again.
Everything is working ok ?!Any hints?
‘
‘ Formativ Macro Export Tasks
‘
‘
option explicit
Sub Main(Client, GWEvent)
dim MailBoxObj
dim Msg
dim sFilter
dim iCount
dim iCatCount
dim sCat
dim i
dim xgroupwise.account.refresh
sFilter = “(TASK) AND (ACCEPTED) AND (NOT COMPLETED)”
Set MailBoxObj = GroupWise.Account.AllMessages.Find(sFilter)
iCount = MailBoxObj.Countif iCount > 0 then
for x = 1 to iCount
set Msg = MailBoxObj.Item(x)
if (Msg.BoxType <> 2) then
iCatCount = Msg.Categories.Count
select case iCatCount
case 0
msgbox(Msg.Subject & “: empty”)
case 1
set sCat = Msg.Categories.Item(1)
msgbox(Msg.Subject & “: ” & sCat.Name)
case else
for i = 1 to iCatCount
set sCat = Msg.Categories.Item(i)
if (sCat.Primary) then
msgbox(Msg.Subject & ” (” & i &”): ” & sCat.Name)
end if
next
end select
end if
next
end if
End Sub
- You must be logged in to reply to this topic.