This has always plagued me…I wish I could find a good tutorial that would let me practice all of the little nuances when working with NotesDateTime objects in script.
OK…here is what is happening here:
I have a PostSave event that is calling a function with arguments. The arguments are NotesDateTime objects. In the called function, I am creating a document, then trying to put the NotesDateTime values on the new document.
Example(only relevant code here):
from PostSave…
Call Invite(cdt as NotesDateTime, sdt as NotesDateTime, edt as NotesDateTime)
Now, in the Invite function, I have this:
Function Invite(cdt As NotesDateTime, sdt As NotesDateTime, edt As NotesDateTime, sd As NotesDateTime)As String
…set db object…
Set InviteEmail = New NotesDocument(db)
InviteEmail.CalendarDateTime = cdt
…here I get type mismatch error. I tested with a msgbox of TypeName(cdt), etc, and they are showing up here as NotesDateTime objects (I cannot get debug to work here, of course)
Can anyone shed some light on what I a doing wrong? I bet it has something to do with how the objects are instantiated, or whatever.
Thanks in advance.
- Matt