Manage Learn to apply best practices and optimize your operations.

Selected documents size

This tip describes how to display the size of the selected document.

This Agent is just a small feature I wanted. This can help you get the size of messages you want to forward. It would be nice to see this as a document option in normal behaviour, don't you agree?

 Dim s As New notessession
 Dim db As notesdatabase
 Set db = s.currentdatabase
 Dim col As notesdocumentcollection
 Set col = db.UnprocessedDocuments
 Dim doc As notesdocument
 If col.Count < 1 Then 
  ' If db properties language (not looked into 
all rnext features yet ;o))
  Print "No Document Selected"
  Exit Sub
 End If
 Set doc = col.GetFirstDocument
 Dim Size As Variant
 Dim kb As Double
 Do While (Not doc Is Nothing)
  Size = Size + doc.Size
  Set doc = col.GetNextDocument(doc)
 '1kb = 1024 b
 kb = Round((Size/1024),3)
 Print Cstr(col.Count) & | Doc Selected, 
Total Size : | & Cstr(kb) &  | Mb

Dig Deeper on Lotus Notes Domino Agents

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...