Backup Notes Document on LotusScript

Create a button, then paste the below program. It translate document items to XML file.

Dim sSession As New NotesSession
Dim dbThis As notesDatabase
Set dbThis = sSession.CurrentDatabase
Dim dc As NotesDocumentCollection
Set dc = dbThis.UnprocessedDocuments
If (dc Is Nothing) Then Exit Sub
If (dc.count < 1) Then Exit Sub
Dim doc As NotesDocument
Set doc = dc.GetFirstDocument
While (Not doc Is Nothing)
Dim de As NotesDXLExporter
Set de = sSession.CreateDXLExporter()
Call de.setInput(doc)
Dim dxl As String
dxl = de.Export
Dim rt As NotesRichTextItem
Set rt = New NotesRichTextItem(doc, "Body")
Call rt.AppendText(dxl)
Call doc.Save(False, False)
Set de = Nothing
Set doc = dc.GetNextDocument(doc)
Wend

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on March 21, 2007 2:08 AM.

第二層皮膚 was the previous entry in this blog.

How to Upgrade osCommerce form ms1(latin1) to ms2(utf8) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.