Hi, I’m working with lotus script.
My problem is open a new lotus window (as a new email message) without send it (the user have to fill some fields first).
This is the script I use:
'**********************************************
Set NotesUIWorksp = CreateObject(“Notes.NOTESUIWORKSPACE”)
Set NotesSess = CreateObject(“Notes.NotesSession”)
strMailServer = NotesSess.GETENVIRONMENTSTRING(“MailServer”, True)
strMailFile = NotesSess.GETENVIRONMENTSTRING(“MailFile”, True)
NotesUIWorksp.OPENDATABASE strMailServer, strMailFile
Set NotesUIDB = NotesUIWorksp.GETCURRENTDATABASE()
Set NotesDB = NotesUIDB.Database()
Set NotesDoc = NotesDB.CREATEDOCUMENT()
Set NotesUIDoc = NotesUIWorksp.EDITDOCUMENT(True, NotesDoc)
NotesUIDoc.FIELDSETTEXT “EnterSendTo”, “test@mail.com”
NotesUIDoc.FIELDSETTEXT “EnterCopyTo”, “”
NotesUIDoc.FIELDSETTEXT “EnterBlindCopyTo”, “”
NotesUIDoc.FIELDSETTEXT “Subject”, “Test”
NotesUIDoc.FIELDAPPENDTEXT “Body”, “Test”
'**********************************************
When I run this script sometimes it doesn’t work. It seems a sync problem when I try to fill a field and the window isn’t still created.
The error I have is:
Run time error (80010105)
Automation error
The server threw an exception
on NotesUIWorksp.EDITDOCUMENT
or
Run time error 91
Object variable or with block variable not set
on NotesUIDB.Database()
thanks in advance
Simone