Sub test(strFormName As String) Dim session As New NotesSession Dim db As NotesDatabase Dim instream As NotesStream Dim importer As NotesDXLImporter dxlpath$="d:\" & strFormName & ".xml" Set db = session.CurrentDatabase Set importer = session.CreateDXLImporter Set instream = session.CreateStream If Not instream.Open(dxlpath$) Then MessageBox "Cannot open DXL file",, dxlpath$ Exit sub End If If instream.Bytes = 0 Then MessageBox "DXL file did not exist or was empty",, dxlpath$ End If Call importer.SetInput(instream) Call importer.SetOutput(db) Call importer.Process Call instream.close End Sub