Counting new/unread mails

Hi,I’m made a completely new mail platform with new design without framesets and menu actions from Domino mail platform. I encountered a problem and it seems hard to solve. I want to count number of new/unread mails in my Inbox folder. does anyone knows the solution?

Regards,

Subject: Counting new/unread mails

Make a view action button with formula:@ViewShowThisUnread(“1”)

Subject: RE: Counting new/unread mails

Thank you for your response and attention but I need a solution to make this goal automated.Regards,

Subject: RE: Counting new/unread mails

Make an agent which runs on “Target: All unread documents in view”, and put as LS code:

Sub Initialize

Dim session As New notessession

unreaddocs=session.currentdatabase.unprocesseddocuments.count

Msgbox unreaddocs

End Sub

Subject: RE: Counting new/unread mails

I did what you told to do. but I recieve “Internal Server Error(500)” error.this is happenning just when I select agent target as “unread documents in view”.

What can I do to resolve this error.

Thank you