Hello,
I’m trying to do this:
open a document in one database, click the button that will create a document in another database, copy 3 fields from one document to another document in the second database and will remain opened so I can further edit that document.
I have this piece of code. I would be very thankfull if you could help me out with this one.
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim database2 As NotesDatabase
Dim view As NotesView
Dim doc2 As NotesDocument
Dim varName, varAcces As String
Dim uidoc As NotesUIDocument
Set uidoc = ws.CurrentDocument
varName = uidoc.FieldGetText( “Rpt_User” )
varAccess = uidoc.FieldGetText( “Rpt_ProblemDetails” )
Set database2 = session.getdatabase(“VALEOSH_KOS01/S/VALEO”, “Kosice\SAP-auth.NSF”)
Set doc2 = database2.CreateDocument
doc2.Form = “CreationSAPBW”
doc2.Editdocument(True) <— error occurs here. I checked the designer help but I didn’t help me
doc2.Demandeur = varName <— the passing of values is not working
doc2.Utilisateur = varName
doc2.Acces=varAcces
doc2.Justification = varAcces
'Call doc2.save(True, True) <— actually I don’t want to save the document but keep it opened for further editing
I tried this. The document is created in second database but the passing of the values of the fields is not working and. And ofcourse the document doesn’t remain opened for further editing which is wrong.
Any ideas?
thank you very much
Robert Hakala