Question about PostOpen event?

Hi,When I check the codes on the Notes mail template, it seems the codes on postopen event is not executed by Lotusscripts of Call m_ws.EditDocument(true,noteMemo), but it is executed by formula @Compose(Reply,) formula button.

In other words, We added codes on PostOpen event of reply form, but when the Reply form is opened by @Compose(Reply,), the codes is executed. It is not executed when open it from backend by Lotusscript codes as I mentioned.

Any ideas? Does all of events on note form suppose working that way?

Thanks

Subject: Question about PostOpen event??

I’d be willing to bet that you are checking for IsNewDoc in your code. If you have already created the document in the back end, then bring it to the UI with EditDocument, it is NOT an new document – you are editing an existing document. If the document has never been saved, though, you can use the IsNewNote property of the NotesDocument.

Subject: RE: Question about PostOpen event??

Hi Stan,Basically these are the part of of the codes copied from CSEventNotesfr library of Notes mail template, the codes will be executed when click Action forward memo of notes Calendar. it will open reply form from the last statement of Editdocument(…), but I also have codes on PostOpen evet of reply form , the codes can not be excuted afther reply form is opened. It seems form event can not be executed by backend open.

from the codes, you can see, there are no save statement after repliceitemvalue… no checking IsNewdoc as well.

Dim noteMemo As NotesDocument

	Set noteMemo = m_beobject.CreateMemo( StatusFlags, IncludeStatus, RolesFlags, IncludeRoles, AppFlags, includeAppFlags, KeepPosted, MemoForm )

	If noteMemo Is Nothing Then

		Msgbox "Ce courrier n'est destiné à aucun invité.",,"Erreur"

		Exit Sub

	End If

	Call noteMemo.Replaceitemvalue("Subject", m_beobject.Document.getitemvalue("Subject")(0))

	Call noteMemo.ReplaceItemValue("tmpNewDoc","1")

	' Add proper letterhead

	Dim letterheadlogo As String

	letterheadlogo = m_beobject.CalendarProfile.Document.DefaultLogo(0)

	If letterheadlogo = "" Then

		Call notememo.Replaceitemvalue("Logo","stdNotesLtr0")

	Else

		Call notememo.Replaceitemvalue("Logo",letterheadlogo)

	End If

		' End of addition to letterhead

	

	Call m_ws.EditDocument(True, noteMemo)

Subject: RE: Question about PostOpen event??

Odd – whenever I’ve looked at the PostOpen event in the Reply form I’ve seen a statement right at the top that begins:

If (Source.IsNewDoc …)