Dim db As NotesDatabase Dim mailpos As Integer Dim found As Integer Dim servername As String Dim mailpath As String Dim mailowner As String Dim inotesdoc As NotesDocument Dim view As NotesView Dim xlFilename As String Dim Excel As Variant Dim xlWorkbook As Variant Dim xlSheet As Variant Dim object As NotesEmbeddedObject Dim i As Integer xlFilename = "C:\dbsize.xls" Set Excel = CreateObject( "Excel.Application" ) Excel.Visible = True Excel.Workbooks.Open xlFilename Set xlWorkbook = Excel.ActiveWorkbook Set xlSheet = xlWorkbook.ActiveSheet Dim cellval As String Dim item As NotesItem Dim profilecollection As NotesDocumentCollection Dim doc1 As NotesDocument 'Mail subdirectory name mailpath = "mail\" 'Server name (in canonical format e.g CN=Servername/O=Acme): servername = "xxxxxx/xxxx" Dim dbdir As New NotesDbDirectory(servername) 'Cycle through mail databases on the server Set db = dbdir.GetFirstDatabase(DATABASE) i=1 While Not db Is Nothing On Error Resume Next 'Check to see if this database is in the mail directory mailpos = InStr(db.FilePath, mailpath) If mailpos = 1 Then Call db.Open(servername, db.FilePath) xlsheet.Cells(i,1).value=db.title xlsheet.Cells(i,2).value=db.size i=i+1 End If Set db = dbdir.GetNextDatabase() Wend Exit Sub