Importing Design Elements, it's the new black
Today I have been importing design elements via dxl. I exported some design elements from designer to separate dxl files and imported them with the function below. It appears quite good. Not really good tho, y'know like sexual intercourse or free beer. Function importDesignFile(dbCopy As NotesDatabase, designFileName As String)
Dim session As New notesSession
Dim stream As NotesStream
Set stream = session.CreateStream
If Not stream.Open(designFileName) Then
Messagebox "Cannot open " & designFileName,, "Error"
Exit Function
End If
If stream.Bytes = 0 Then
Messagebox "File did not exist or was empty",, designFileName
Exit Function
End If
REM Import DXL into new database
Dim importer As NotesDXLImporter
Set importer = session.CreateDXLImporter(stream, dbCopy)
importer.ReplicaRequiredForReplaceOrUpdate = False
importer.DesignImportOption = DXLIMPORTOPTION_REPLACE_ELSE_CREATE
Call importer.Process
End Function
<< Home