ho trovato quello che mi indicavi : Sub Initialize Dim s As New NotesSession Dim view As NotesView Dim doc As NotesDocument Dim nView As NotesView Dim nDoc As NotesDocument Dim key As String Dim newDoc As NotesDocument Dim itemA As NotesItem Set db = s.CurrentDatabase Set nView = db.GetView("nmusei") Set old = s.GetDatabase(db.Server, "pippo\pluto\paperino.nsf") Set view = old.GetView("notesmuseifr") Set doc = view.GetFirstDocument Set itemA = doc.GetFirstItem( "orariopenfr" ) While Not doc Is Nothing \'fintanto che doc esiste \' Set nDoc = Nothing \' key = Cstr(doc.Ship(0))+Cstr(doc.Voy(0)) \' Set nDoc = nView.GetDocumentByKey(key) If nDoc Is Nothing Then \'creazione nuovo documento Set newDoc = db.CreateDocument \'campi \'newDoc.Form = "musei" \'newDoc.localitamusei = doc.localitafr(0) Call itemA.CopyItemToDocument( nDoc, "openmusei" ) Call newDoc.Save(True, False, True) End If Set doc = view.GetNextDocument(doc) Wend End Sub ma quando eseguo l\'agente mi da quest\'errore: Function requires a valid ADT argument forse sbaglio qualche cosa nel codice??
|