Below script helps you to get mail file owner name in IBM Lotus Notes client.
Sub Click(Source As Button)
Dim session As New notesSession
Dim db As NotesDatabase
Dim doc As notesdocument
Dim owner As NotesItem
Dim ownerName As String
Set db = session.CurrentDatabase
Set doc= db.GetProfileDocument("CalendarProfile")
Set owner= doc.getFirstItem("Owner")
Dim userName As New NotesName(owner.Text)
ownerName = userName.Abbreviated
Msgbox "Mail file owner is " & ownerName
End Sub
Subscribe to:
Post Comments (Atom)
4 comments:
i hav an application that should not run on web..It should work only on the client. How can it be done??? Can it be done with formula?? if not is there any lotus script code to do thi????
i hav an application that should not run on web..It should work only on the client. How can it be done??? Can it be done with formula?? if not is there any lotus script code to do thi????
Thanks, it helped alot to set the SendTo-field of current doc to Mailfile-owner:
Sub Click(Source As Button)
Dim session As New notesSession
Dim db As NotesDatabase
Dim doc As notesdocument
Dim owner As NotesItem
Dim ownerName As String
Set db = session.CurrentDatabase
Set doc= Set ownerDoc = db.GetProfileDocument("CalendarProfile")
If Not (ownerDoc Is Nothing) then
Set owner = ownerDoc.getFirstItem("Owner")
Call newDoc.Appenditemvalue("SendTo", owner.Text )
Call newDoc.send(true)
End Sub
Thanks Piyush & Peter. In my case, the Owner item was not present! I used db.GetProfileDocCollection("CalendarProfile") and looped through each doc till I got Owner item.
Post a Comment