Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim sdoc As NotesDocument
Dim doc As NotesDocument
Dim SourceFieldValues As Variant
Dim collect As NotesDocumentCollection
Set collect = db.UnprocessedDocuments
Set sdoc = collect.GetFirstDocument
Do
SourceFieldValues = sdoc.GetItemValue("OfficeName")
For J = 0 To Ubound(SourceFieldValues)
Set doc = db.CreateDocument
doc.Form = "DLE"
doc.dl_category="Office"
doc.dl_entry = SourceFieldValues(J)
Call doc.Save(True, True)
Next J
Set sdoc = collect.getnextdocument(sdoc)
Loop Until sdoc Is Nothing
Msgbox "Done"
End Sub