Sub Initialize
Dim session As NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim exporter As NotesDXLExporter
Dim importer As NotesDXLImporter
Set session = New NotesSession
Set db = session.CurrentDatabase
Set nc = db.CreateNoteCollection(False)
nc.SelectDocuments = True
Call nc.BuildCollection
REM Set up importer to receive DXL piped from exporter
REM and to re-import the documents back into the
REM current database as copies.
Set exporter = session.CreateDXLExporter(nc)
Set importer = session.CreateDXLImporter(exporter, db)
exporter.Process
End Sub