我正在使用Lotus Notes Client 8.5,我想将邮件项目导出到DXl文件中。谁能告诉我将笔记doxument转换成DXL文件的步骤?
答案 0 :(得分:4)
创建Java代理以导出所有选定文档的DXL文件:
import lotus.domino.*;
public class JavaAgent extends AgentBase {
@Override
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
DocumentCollection dc = agentContext.getUnprocessedDocuments();
String filename = "c:/temp/exportDocs.dxl";
Stream stream = session.createStream();
if (stream.open(filename)) {
stream.truncate();
DxlExporter exporter = session.createDxlExporter();
exporter.setRichTextOption(0);
exporter.setMIMEOption(0);
stream.writeText(exporter.exportDxl(dc));
} else {
System.out.println("Cannot open " + filename);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
保留新代理的默认设置,例如“目标:所有选定文档”。
打开一个视图,选择文档并运行代理。
作为替代方案,您可以创建LotusScript代理
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim filename As String
Dim stream As NotesStream
Dim exporter As NotesDXLExporter
Set db = session.Currentdatabase
set dc = db.UnprocessedDocuments
filename = "c:/temp/exportDocs.dxl"
set stream = session.createStream()
If stream.Open(filename) Then
Call stream.Truncate()
set exporter = session.CreateDxlExporter()
exporter.Richtextoption = 0
exporter.MIMEOption = 0
Call stream.WriteText(exporter.Export(dc))
End if
End Sub