Documents (public) created with script stay unread

Unread marks again:In a database with several different forms one type of documents is created by script in an agent called from an action button. Those documents stay unread (always !), with one exception: the ‘ins’-key works (and the ‘mark all read’ too). Has the fact that the document is a ‘public’ one (editable with reader access)?

Another type of document, created by script from a scheduled agent (not public), behaves correctly.

Here is the code, that creates the document:

(the document handle is called ‘profile’, but it isn’t one)

If profile Is Nothing Then

Set profile = New NotesDocument ( db )

profile.Form = "InterestProfile"

Set item = New NotesItem ( profile, "$PublicAccess", "1" )

Set item = New NotesItem ( profile, "InterestProfileUser", CurrentUser.Canonical )

item.IsAuthors = True

item.IsSummary = True

Set item = New NotesItem ( profile, "Reader", CurrentUser.Canonical )	

Call item.AppendToTextList ( "[AdminRead]" )

Call item.AppendToTextList ( "[ReadAdmin]" )

item.IsReaders = True

item.IsSummary = True

Set item = New NotesItem ( profile, "Author", CurrentUser.Canonical )		

item.IsAuthors = True

item.IsSummary = True

	profile.InterestProfileLastMessage = Now

End If

Call profile.Save ( False, True )