Dear All,
Writing a script to extract Quota, Warning, Size for all the users in the address book. Getting error "Object Variable not set" after "Set db1 = s.CurrentDatabase" i.e., when trying to get quota.
Will be greatful if some one helps!..
Sub Initialize
Dim ws As NotesUIWorkspace
Dim s As NotesSession
Dim db, db1 As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Dim nav As NotesViewNavigator
Dim entry As NotesViewEntry
Dim doc As notesdocument
Dim mserver As variant
Dim mname As variant
Dim Quota As Long
Dim Warning As Long
Dim Size As Long
Set db = New NotesDatabase ("Hub/Wipro", "names.nsf")
Set view = db.Getview("People")
Set nav = view.CreateViewNav
Set entry = nav.GetFirstDocument
While Not (entry Is Nothing)
Set doc = entry.Document
mserver=doc.GetItemValue("MailServer")
mname=doc.GetItemValue("MailFile")
Set db = s.GetDatabase( mserver(0), mname(0) )
Set db1 = s.CurrentDatabase
Quota = db.SizeQuota\1024
Warning = db.SizeWarning\1024
size=(db.size \ 1024) \ 1024
MsgBox "MailBox Quota is" &Quota
MsgBox "MailBox Warning is" &Warning
MsgBox "MailBox Size is" &size
Set entry = vc.GetNextEntry(entry)
Wend
End Sub
 
Feedback number WEBB8U9ABM created by Meena Ramesh on 05/13/2012

Status: Open
Comments:

Error while extracting Mailfile Det... (Meena Ramesh 13.May.12)
. . multiple usage of object db (Watka Naidoo 13.May.12)
. . . . Error while extracting mailfiles (Meena Ramesh 15.May.12) |