本文介绍了如何将Notes文档(电子邮件,任务等)从Lotus Notes Client 8.5导出到DXL文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Lotus Notes Client 8.5,我想将邮件导出到DXl文件中。任何人都可以告诉我将笔记文件转换成DXL文件的步骤?

解决方案

创建一个Java代理以导出所有的DXL文件选择的文件:

  import lotus.domino。 

public class JavaAgent扩展AgentBase {

@Override
public void NotesMain(){

try {
会话会话= 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(Can not open+ filename);
}
} catch(Exception e){
e.printStackTrace();
}
}
}

保留新代理的默认设置像Target:所有选定的文档一样。



打开视图,选择文档并运行代理。



作为替代,您可以创建一个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()
如果流。打开(filename)然后
调用stream.Truncate()
set exporter = session.CreateDxlExporter()
exporter.Richtextoption = 0
exporter.MIMEOption = 0
C所有stream.WriteText(exporter.Export(dc))
如果
结束Sub


I am using Lotus notes Client 8.5 and i want to export mail items into DXl file. can anyone tell me the steps to convert notes doxument into DXL file?

解决方案

Create a Java agent to export a DXL file for all selected documents:

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();
        }
    }
}

Leave default settings for new agent like "Target: All selected documents" as they are.

Open then a view, select documents and run the agent.

As an alternative you can create a LotusScript agent

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

这篇关于如何将Notes文档(电子邮件,任务等)从Lotus Notes Client 8.5导出到DXL文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 19:56