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.
博客介绍了一种让用户查看邮件文件占用磁盘空间的方法。通过在Notes客户端内联网主页或文档区域的按钮中插入特定代码,只要用户能通过Notes客户端访问该按钮,对话框就会返回邮件文件所在服务器、目录及大小等信息。
1752

被折叠的 条评论
为什么被折叠?



