Re: VB mail using Lotus Notes


[ Follow Ups ] [ Post Followup ] [ Knowledge Management Discussion ] [ FAQ ]

Posted Bykasem on August 19, 19102 at 09:29:55:

In Reply to: Re: VB mail using Lotus Notes posted byRavikanth on January 28, 19102 at 00:18:04:

: Do you need Lotus Script(VB) to solve this problem?
: If so here is the script.
: Function SendMailMemo(sendTo As String, _
: cc As String, _
: bcc As String, _
: subject As String, _
: body As String, _
: linkTo As NotesDocument) As Integer
: On Error Goto ErrorHandler

: Dim mailDb As New NotesDatabase("", "")
: Dim mailDoc As NotesDocument
: Dim rtItem As NotesRichTextItem

: Call mailDb.OpenMail
: If (mailDb.IsOpen = False) Then Call mailDb.Open("", "")
: Set mailDoc = mailDb.CreateDocument
: mailDoc.Form = "Memo"
: mailDoc.SendTo = sendTo
: mailDoc.CC = cc
: mailDoc.BCC = bcc
: mailDoc.Subject = subject
: Set rtItem = mailDoc.CreateRichTextItem("Body")
: Call rtItem.AppendText(body)
: If Not(linkTo Is Nothing) Then
: Call rtItem.AddNewLine(2)
: Call rtItem.AppendDocLink(linkTo, "Double-click to open document")
: End If
: Call mailDoc.Send(False)
: SendMailMemo = True
: Exit Function

: ErrorHandler:
: Print "Error " & Str$(Err) & ": " & Error$
: Resume TheEnd

: TheEnd:
: SendMailMemo = False
: End Function

: Thanks,
: Ravikanth




Follow Ups



Post Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Knowledge Management Discussion ] [ FAQ ]