Several addressees in BlindCopyTo

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?

Subject: Several addressees in BlindCopyTo

Hi.

Without having tested this, it looks like you have to check whether there is a BCC reciepient or not. If there is at least one, you should copy the complete field to maildoc.BlindCopyTo. So it should be …

maildoc.BlindCopyTo = doc.InaddCopy

Subject: RE: Several addressees in BlindCopyTo

try saving all of the values in an array variable then send the doc to the variable name. the way you have it coded you are only selecting the first name in the field.