Examples: Parent property (NotesNewsletter - LotusScript®)

This Visual Basic code displays the parent user name of a NotesNewsletter object.

Private Sub NewsParent_Click()
Dim s As New NotesSession
Dim news As NotesNewsletter
Dim dir As NotesDbDirectory
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Set dir = s.GetDbDirectory("")
Set db = dir.OpenDatabase("Web test")
Set dc = db.AllDocuments
Set news = s.CreateNewsletter(dc)
MsgBox news.Parent.UserName, , "Parent user name"
End Sub