This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
First of all, create a form called "Action button" containing the button you want to email. The button should containt the lotsusscript
Then you create this code to generate the email you're sending out, which will contain the button
Dim s As New NotesSession
Dim dbCurrent As NotesDatabase '<--this database
Dim docMail As NotesDocument '<-- the document we will be emailing
Dim rtBody As NotesRichTextItem '<-- the body field of the email document
Dim docTempButton As NotesDocument '<-- a temporary document containing the form with the action button
Dim rtTempField As NotesRichTextItem '<-- a temporary field in docMail where this button should be added
'We get the current database
Set dbCurrent = s.CurrentDatabase
' We create the mail document
Set docMail = dbCurrent.CreateDocument
With docMail
.Form = "Memo"
.SendTo = "recipients" '<-- Insert your recipients here
.Subject = "A subject of your choice"
End With
'We create the body field and add a text and line break
Set rtBody = New NotesRichTextItem( docMail, "rtBody")
Call rtBody.AppendText("Click on the following button.")
Call rtBody.AddNewLine( 1 )
' We create a temporary document containing the button you want to send out
Set docTempButton = dbCurrent.CreateDocument
docTempButton.Form = "Action button"
'We add the button to a temporary field in the mail document
Set rtTempField = New NotesRichTextItem( docMail, "rtTempField")
success = docTempButton.RenderToRTItem( rtTempField )
' We put this button in the the body of the email
Call rtBody.AppendRTItem( rtTempField )
' We nove remove the temporary field
Call rtTempField.Remove
'We send the email
Call docMail.Send(False)
Feedback response number WEBB9AKBTF created by ~Gus Dwoboosimaroni on 08/14/2013