Skip to main content
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:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Here's how I've done it

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

Lotusscript and mail (~Keiko Fezreson... 14.Aug.13)
. . Here's how I've done it (~Gus Dwoboosima... 14.Aug.13)
. . . . Error (~Keiko Fezreson... 16.Aug.13)
. . . . . . Never done this with Java (~Gus Dwoboosima... 16.Aug.13)
. . . . . . Try saving the new document first (~August Cispone... 18.Aug.13)
. . . . . . . . still not working (~Keiko Fezreson... 19.Aug.13)
. . . . . . . . . . Question (~Keiko Fezreson... 19.Aug.13)
. . . . . . . . . . You are not saving the right docume... (~August Cispone... 19.Aug.13)
. . . . Question (~Keiko Fezreson... 19.Aug.13)
. . . . . . Button is included (~Gus Dwoboosima... 20.Aug.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS