Dear All,
I have created a toolbar button whose click provokes a form to be opened. This form runs some code that allows me to create then to edit (open) a new calendar document.
Dim uiw As New NotesUIWorkspace
Dim db As New NotesDatabase(“”, “”)
Call db.openmail
Dim doc As NotesDocument
Set doc = db.CreateDocument()
…
'set a lot of Item to the document to make it a calendar document
…
Call doc.AppendItemValue(“ApptUNID”,doc.UniversalId)
Call doc.Save(True, False)
Call uiw.editDocument(True, doc)
This code is correct if I click on the button while there is no existing calendar entry selected in my calendar view.
However, if, when I click on the button, one existing calendar entry is selected in my calendar, the code raises these following messages:
“Invalid or nonexistent Document”
then
“Unable to find Document Window”
Do you know why the selection of an existing graphical calendar entry provokes EditDocument to fail with these error messages?
Please note that after these errors messages, the newly created document is opened correclty in the calendar view.
Thanks in advance for your support,
Mikaël Donini, Arkadin, France