OK,
No I don't monitor ALL the forums, but Access and Notes are two that I do (plus Delphi!).
First off, do you have access to the Notes Designer program? That's where you will get information about all the Notes commands. I'm using Notes 6.0 and things have changed a little, there are actually VB examples, so some of what I may tell you might be incorrect for your version.
Secondly, the OPENMAIL command opens the current users mailbox.
this command creates a rich text area for the body of the email:
Code:
Set notesrtf = notesdoc.CreateRichTextItem("body")
this command adds the 'Add Additional text here' to the body of the email:
Code:
Call notesrtf.AppendText("Add Additional text here.")
this command appends one or more new lines (carriage returns) to the end of a rich text item
Code:
Call notesrtf.AddNewLine(2)
here's the help on the AddNewLine
Call notesRichTextItem.AddNewLine( n% [, forceParagraph ] )
Parameters
n%
Note In COM this parameter is optional and defaults to 1.
Integer. The number of new lines to append.
forceParagraph
Boolean. Optional. If True, forces the new line to be a paragraph separator. If False, the new line is added, but does not force a new paragragh. True by default.
Here's is a little bit easier code for creating a simple email, but this example is in Lotus Script and would have to be modified a bit to work in VB: (I actually get information from another document in Notes so this will look wierd!)
Code:
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim newdb As NotesDatabase
Dim doc As NotesDocument
Dim maildoc As NotesDocument
Dim mailrtitem As NotesRichTextItem
Dim language As String, docket As String, fname As String, lname As String, interveiwer As String, notify As String
Dim Comments As String
Dim intdate As Variant
'set current session to current document so information can be transferred to mail document
Set db = session.CurrentDatabase
Set servername = New NotesName(db.Server)
'set information for mail
domainmailfile = "mail.box"
Set newdb = session.GetDatabase(servername.Abbreviated, domainmailfile)
'create new maildocument
Set maildoc = New NotesDocument(newdb)
'check my data to see if I need to send the email or not
Set doc = source.Document
If (source.FieldGetText("InterviewLanguage") = "Other" And source.FieldGetText("OtherLanguage") <> "") Then
'create list of people to send to (this way will only work if they are in YOUR mail directory, you would need to spell out the email address if not in your directory)
Dim recipients( 1 To 2 ) As String
recipients( 1 ) = "John Doe"
recipients( 2 ) = "Jane Smith"
'only send if a new document, if someone has edited an existing document I don't want to send the notification
If source.document.IsNewNote Then
'get all the information for the body of the email
language = source.FieldGetText("OtherLanguage")
docket = source.FieldGetText("DocketNo")
fname = source.FieldGetText("FirstName")
lname = source.FieldGetText("LastName")
intdate = source.FieldGetText("InterviewDate")
interviewer = source.FieldGetText("Interviewer")
'assign the new document to an email form
maildoc.Form = "Memo"
'add subject line to email
maildoc.Subject = "Translator Needed"
'add body of email with information from above
maildoc.Body = "Case Number: " + docket + ". " + fname + " " + lname + " , interviewed on " + intdate + " by " + interviewer + ", requires a " + language + " translator. Thank you."
'send the email False indicates I don't want to attach the document and recipients is who is getting the email
Call maildoc.Send( False, recipients )
Else
Exit Sub
End If
End If
so here are two different ways of creating the body of the email. The first one I gave you is already in VB, the second one is Lotus Script and will have to be modified to work in VB.
If you don't have access to Domino Designer I would ask for it to be installed. It will be easier for you (if you can decipher Notes help logic!!) on some basic functions.
HTH
and if you need anything else, feel free to post back, I'll be lurking around some forum!
Les