LotusScript for IncludeDocLinks in @Mailsend

What is the equivalent LotusScript code for [IncludeDocLink] in the @Mailsend formula?

There's not a direct replacement. If you want to have more control, you go to LotusScript, but boy do you get a LOT more control. Here's what you'll need to do to have the @MailSend duplicated in LotusScript, functionally:

Dim wsCurrent As New NotesUIWorkspace
Dim nsCurrent As New NotesSession
Dim ndbCurrent As NotesDatabase
Dim ndMail As NotesDocument
Dim nrtMailBody As NotesRichTextItem
Dim sMessage As String
Dim sSendTo As String

sSendTo = "First Person/MyGroup/MyCompany"
sMessage = InputBox$("What message:")
Set ndbCurrent = nsCurrent.CurrentDatabase
Set ndMail = ndbCurrent.CreateDocument
ndMail.Form = "Memo"
Set nrtMailBody = ndbCurrent.CreateRichTextItem("Body")
If sMessage <> "" Then
	Call nrtMailBody.AppendText(sMessage)
End If
Call nrtMailBody.AppendDocLink(ndbCurrent, "Link to my Doc")
Call ndMail.Send(False, sSendTo)

The object you put in the AppendDocLink method can be a NotesDatabase (as I used here), and NotesView, or a NotesDocument object.

Dig Deeper on LotusScript



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury