Sub Initialize
        Dim session As New NotesSession
        Dim db As NotesDatabase
        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
       
       
        Set db = session.CurrentDatabase'新增
        Set excelApplication = CreateObject("Excel.Application")
        excelApplication.Visible = True '显示EXCEL
        Set excelWorkbook = excelApplication.Workbooks.open("D:\资料\20050915-考勤管理初步设计V1.0.xls")
        Set excelSheet = excelWorkbook.Worksheets("案例管理模块")
        For x = 2 To 100      '从第二行到第三行导入NOTES
                Set doc = New NotesDocument(db)
                doc.Form="frmInexcel"     '赋表单名
                doc.A1 = excelSheet.Cells(x,1).Value
                doc.A2 = excelSheet.Cells(x,2).Value
                doc.A3 = excelSheet.Cells(x,3).Value
                doc.A4 = excelSheet.Cells(x,4).Value
                doc.A5 = excelSheet.Cells(x,5).Value
                doc.A6 = excelSheet.Cells(x,6).Value
                doc.A7 = excelSheet.Cells(x,7).Value
                doc.A8 = excelSheet.Cells(x,8).Value
                Call doc.Save(True,True)
        Next
        'excelApplication.quit
        Set excelApplication = Nothing       
End Sub