I may have a workaround if the issue is what I think it is. If you're happy to delve in to the design you can alter the agent thus:
(Declarations)
Dim intPos As Integer –> Dim intPos As Long
Sub Initialize
Dim ii As Integer –> Dim ii As long
Sub PopulateCount(doc As NotesDocument, intPtr As Integer, empty As Boolean) –> Sub PopulateCount(doc As NotesDocument, intPtr As long, empty As Boolean)
Sub PopulateTotal(doc As NotesDocument, intPtr As Integer, empty As Boolean) –> Sub PopulateTotal(doc As NotesDocument, intPtr As Long, empty As Boolean)
If you'd rather not, you can use http://www.dbpsolutions.com/contact to give me your email I'll send over a updated template for you to try.