I have an editable field (INaddcopy) in a form with type “Names”. Next to it is a button with this formula:
FIELD INaddCopy := @Name([CN];@PickList([Name]:[Shared]));“”
So, the user can select 1 or more names out of the Company’s Name & Address book.
Then, there is a “Submit” button in which an email is sent to the persons in the field INaddcopy:
This script is used:
Dim maildoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim strPersonName As String
Dim nn As NotesName
Set maildoc=New NotesDocument(db)
maildoc.SendTo=doc.INsupv(0)
maildoc.copyTo=doc.INdivmgr(0)
maildoc.BlindCopyTo=doc.INaddCopy(0)
maildoc.Subject = "First notification Injury - " + doc.INNum(0)
Set nn = ss.CreateName(doc.INsupv(0))
strPersonName = nn.Common
Set rtitem = New NotesRichTextItem( mailDoc, "Body" )
'Call rtitem.AppendText("Dear " + doc.INsupv(0) + "," )
… ETCETERA …
maildoc.Send(0)
The problem is in the instruction: maildoc.BlindCopyTo=doc.INaddCopy(0)
… when more than 1 name is selected for the INaddcopy field, no email is sent to them. It works only with 1 name in the INaddcopy field.
How can this be solved?