Friday, October 28, 2005

Inbox Management (Adding Mail File Size to Template)

One of the items I posted about at Ed Brill's thread on this was that I have implemeted a text section below the mail file owner's name that will display the mail file storage utilization. This looks nearly the same as the OpenNTF implementation, but my implementation was far simpler after looking at their code.

The following modifications need to be made in the most current releases of the "Domino Web Access" and "Mail" templates (or other template(s) you may be implementing).

1) Open the "Switcher Form for Mail" Form.
2) After the first "Computed Value" section, hit Enter.
3) On the blank line create a Computed Text Field named dspMailFileSize with a default value of dspMailFileSize
4) In the PostOpen event of the same Form, use the following code:

Sub Postopen(Source As Notesuidocument)

Dim s As New NotesSession
Dim db As NotesDatabase
Dim size As Variant

Set db = s.CurrentDatabase

size = (Cdbl(db.Size) / 1024) / 1024

Call source.FieldSetText("dspMailFileSize", "Usage: " + Cstr(size)+" MB")

End Sub


Please note that due to client caching of the mail template(s), this change may not be propagated for a few days. From my research, I could not find a way to force the client to update the cache. Deleting cache.ndk would force it to work after restarting Notes, though.

2 comments:

Anonymous said...

Ok, since you don't like the notes.ini vars, I pulled them for the ND7 version.
How does that sound? :-)

Chris Whisonant said...

Vince, thanks for stopping by. Glad I could help out - lol!

I'll have to check out your new implementation.