We all know, users could care less (most of them, unless you've hounded them enough) or wouldn't even know how to check their mail file size, right? Well, if you have a homepage on your Notes client intranet, or an area where users will eventually stumble upon documents, insert the following code in a button and it will inform your users how much disk space their mail file is utilizing:
Dim s As New NotesSession
Dim db As NotesDatabase
Dim uname As String
Dim mailfileloc As Variant
Const MB_OK = 1
Const MB_ICONINFORMATION=64
boxtype& = MB_OK + MB_ICONINFORMATION
Set db=s.CurrentDatabase
uname = s.CommonUserName
srvname = Evaluate("@Name([CN];@Subset(@MailDBName;1))")
mailfileloc = Evaluate("@Subset(@MailDBName;-1)")
Dim mydb As New NotesDatabase( Cstr(srvname(0)), Cstr(mailfileloc(0)))
Msgbox "Server: " & srvname(0) & Chr$(13) _
& "Db directory and db name: " & mailfileloc(0) & Chr$(13) & Chr$(13)_
& "The size of your mail file is: " _
& Round(mydb.Size/1048576, 2) & "Mb", boxtype&, "Mail file of " & uname & "..."
As long as the user has access to the button via their Notes client, the dialog box should return the appropriate information to them.
Dim s As New NotesSession
Dim db As NotesDatabase
Dim uname As String
Dim mailfileloc As Variant
Const MB_OK = 1
Const MB_ICONINFORMATION=64
boxtype& = MB_OK + MB_ICONINFORMATION
Set db=s.CurrentDatabase
uname = s.CommonUserName
srvname = Evaluate("@Name([CN];@Subset(@MailDBName;1))")
mailfileloc = Evaluate("@Subset(@MailDBName;-1)")
Dim mydb As New NotesDatabase( Cstr(srvname(0)), Cstr(mailfileloc(0)))
Msgbox "Server: " & srvname(0) & Chr$(13) _
& "Db directory and db name: " & mailfileloc(0) & Chr$(13) & Chr$(13)_
& "The size of your mail file is: " _
& Round(mydb.Size/1048576, 2) & "Mb", boxtype&, "Mail file of " & uname & "..."
As long as the user has access to the button via their Notes client, the dialog box should return the appropriate information to them.