Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim excelApplication As Variant
Dim excelWorkbook As Variant
Dim excelSheet As Variant
Dim i As Integer
Dim Mood As String
Dim selection As Variant
On Error Goto Err1
Set excelApplication = CreateObject("Excel.Application")
'excelApplication.Visible = True
Set excelWorkbook = excelApplication.Workbooks.Add
Set excelSheet = excelWorkbook.Worksheets("Sheet1")
'定义excel的列植
excelSheet.Cells(1,1).Value = "序号"
……
excelSheet.Cells(1,9).Value = "备注"
excelWorkbook.SaveAs("c:\产品状态表.xls")
excelApplication.Quit
Set excelApplication = Nothing
End Sub