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 NotesSessionDim db As NotesDatabaseDim uname As StringDim mailfileloc As VariantConst MB_OK = 1Const MB_ICONINFORMATION=64boxtype& = MB_OK + MB_ICONINFORMATIONSet db=s.CurrentDatabaseuname = s.CommonUserNamesrvname = 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.