The integration of email and databases are a great strength of Lotus Notes: there is no additional sign-ins the names are the same and links work. I've recently been asked to sent a notice to a person whenever one or more of a list of options are checked. Not a problem coding for that is pretty simple. But I want to send a comprehensible email, at least tagging what the changes have been. Well, arrays work for that, you can create one, resize it and pop it over no problem. But that's a lot of work and memory. Oh, wait, I have to list the changes, why not use a List? Duh. OK, so I'm doing that. No resizing, and it grabs what I want, easy. I did a little testing before I started coding this into my application, and that's below. I put his in my code database because I'm sure I'll be using it more in the future. I'm sure other people have been doing this sort of thing for a while, but it never hurts to put things out there: there are all sorts of functions and methods we just don't think of.
Dim testList List As String
testList("first" ) = "Hmm, here is the start of a list"
testList("second" ) = "Continue the list"
testList("third" ) = "OK, we're ending it now"
Call SendMessage(testList, db)
Function SendMessage (testList List As String, db As NotesDatabase)
Dim thebody As Variant
Set thebody = New NotesRichTextItem(memodoc, "Body" )
Call thebody.AppendText("Here is a test of passing lists" )
If Iselement(testList("first" )) Then
Call thebody.AppendText("First - " & testList("first" ) )
Forall i In testList
Call thebody.AddNewLine(1 )