Sub Initialize
Dim arrAttachmentNa mes As Variant
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCo llection
Dim doc As NotesDocument
Dim attachment As NotesEmbeddedOb ject
Set db = session.Current Database
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocu ment
CurrID = 100000
While Not doc Is Nothing
CurrIDStr = CurrID
Open "d:/export/records/"+CurrIDStr+".x ml" For Output As 1
Print #1, ""
Print #1, ""+CurrIDSt r+""
arrAttachmentNa mes = Evaluate("@Atta chmentNames", doc)
For n = 0 To Ubound( arrAttachmentNa mes )
If arrAttachmentNa mes(n) Like "*.*" Then
Set attachment = doc.GetAttachme nt(
arrAttachmentNa mes(n) )
fileName=CurrID Str+"-"+arrAttachment Names(n)
Print #1,""+fileName+ ""
Call
attachment.Extr actFile("d:/export/attachments/"+fileName)
End If
Next n
allFieldNames = Evaluate("@DocF ields", doc)
For k = 0 To Ubound( allFieldNames )
Print #1, ""
Print #1, ""
Print #1, allFieldNames(k )
Print #1, ""
Print #1, ""
If Not Isempty(doc.Get ItemValue(allFi eldNames(k))) Then
something = doc.GetItemValu e(allFieldNames (k))(0)
Print #1, something
End If
Print #1, ""
Print #1, ""
Next k
Print #1, ""
Close #1
Set doc = dc.GetNextDocum ent( doc )
CurrID = CurrID + 1
Wend
End Sub
Dim arrAttachmentNa mes As Variant
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCo llection
Dim doc As NotesDocument
Dim attachment As NotesEmbeddedOb ject
Set db = session.Current Database
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocu ment
CurrID = 100000
While Not doc Is Nothing
CurrIDStr = CurrID
Open "d:/export/records/"+CurrIDStr+".x ml" For Output As 1
Print #1, ""
Print #1, ""+CurrIDSt r+""
arrAttachmentNa mes = Evaluate("@Atta chmentNames", doc)
For n = 0 To Ubound( arrAttachmentNa mes )
If arrAttachmentNa mes(n) Like "*.*" Then
Set attachment = doc.GetAttachme nt(
arrAttachmentNa mes(n) )
fileName=CurrID Str+"-"+arrAttachment Names(n)
Print #1,""+fileName+ ""
Call
attachment.Extr actFile("d:/export/attachments/"+fileName)
End If
Next n
allFieldNames = Evaluate("@DocF ields", doc)
For k = 0 To Ubound( allFieldNames )
Print #1, ""
Print #1, ""
Print #1, allFieldNames(k )
Print #1, ""
Print #1, ""
If Not Isempty(doc.Get ItemValue(allFi eldNames(k))) Then
something = doc.GetItemValu e(allFieldNames (k))(0)
Print #1, something
End If
Print #1, ""
Print #1, ""
Next k
Print #1, ""
Close #1
Set doc = dc.GetNextDocum ent( doc )
CurrID = CurrID + 1
Wend
End Sub
Comment