Hi,I have a view with some documents and would like to create a new document in the backend for each document in the view, including some information from the original doc. I try this script, but it only saves the last document and not all.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim parent As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("CFP")
view.AutoUpdate = False
Set parent = view.GetFirstDocument
Set doc = db.CreateDocument
While Not (parent Is Nothing)
doc.AWB = parent.GetItemValue("AWB")
doc.Form = "Deckblatt"
Call doc.ComputeWithForm( True, True )
Call doc.Save(True, False)
Set parent = view.GetNextDocument(parent)
Wend
End Sub
It looks like something with saving each doc doesn’t work, but I have no idea where my error is. Thanks.
Oliver