Domino Code Fragment

Code Name*
This button script is useful in a mail message to a group of persons.
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.118.32.213
Description*
1. When the recipient clicks the button, the script sends a mail message
indicating "Yes" or "No" for the "RSVP." For testing, the name of the current user is used--in practice, you would use your name.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
'(Declarations)
Const MB_YESNO = 4
Const MB_ICONQUESTION = 32
Const IDYES = 6


'(Click event)
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
yesno = Messagebox _
("Do you want to attend?", MB_YESNO+MB_ICONQUESTION)
If yesno = IDYES Then rsvp = "Yes" Else rsvp = "No"
Call doc.AppendItemValue("Subject", "RSVP")
Call doc.AppendItemValue("Body", rsvp)
Call doc.Send(True, session.UserName)
End Sub