Manage Learn to apply best practices and optimize your operations.

Handy tool for looking at all document fields

This tip creates a CSV file of the contents of a document.

View member feedback to this tip.

This tip is a simple little tool that just creates a CSV file of the contents of a document (i.e., fieldname, val1, val2, valn, etc.). I have found it useful in diagnosing problems. The result can be loaded into Excel, and you can then use it to locate changes in doc fields.

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim collection As
 Dim doc As NotesDocument
 Set db = session.CurrentDatabase
 Set collection = db.UnprocessedDocuments
 Set doc = collection.GetFirstDocument()
 Dim messagestring As String
 FileName = Left(Cstr(db.FileName),
 File2 = "C:DocExport-" & FileName & "csv"
 fileNum% = Freefile()
 Open File2 For Output As # fileNum%
 Forall i In doc.Items
  messageString = ""
  If i.type = 1 Then
   'Is rich text desplay the text version
   messageString  = ",RichText " + i.text
   Forall o In i.values
    'Now check for an array)
    If Cstr(o) = "" Then
     messageString = MessageString 
+" , " + "Null Value
Found" Else messageString = MessageString +" , " + Cstr(o) End If End Forall End If Print #fileNum%, +MessageString End Forall result = Shell("notepad.exe " & Cstr(File2), 1) End Sub


There is also a Notes Document Viewer database in the sandbox on the Lotus site that will let you search through all fields in a document. It was created by Frank Paolino of I've found this very useful and it doesn't require an agent.

-- Chris K.

Do you have comments on this tip? Let us know.

Dig Deeper on Lotus Notes Domino Agents

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...