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



  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...