PDA

View Full Version : multiple e-mail addresses in SendTo,Notes client



Grigoras
06-27-2008, 01:01 AM
:dunno Hi.I have a Excel macro which send mails, and addresses are get from a Excel cell.
The problem is:
If cell contain a single mail address everything is OK.(Ex.victor.grigoras@romtelecom.ro)
If cell contain more than an address (Ex.victor.grigoras@romtelecom.ro,marius.vasile@yahoo.com,gigi.radu@big.ro)
the mail client send mail only to the first address from cell.
Like a curiosity ,when I verify from Notes client if the mail was send,in To field appear all addresses but the difference is that the first address appear victor.grigoras@romtelecom.ro (with @.....) when other addresses appear without @........
Bellow is a part of macro.Cells with addresses are text formated


v = Cells(e, 13)
vaRecipient = v
j = Cells(e, 15)
vaCCRecipient = j




'Instantiate the Lotus Notes COM's Objects.
Set noSession = CreateObject("Notes.NotesSession")
Set noDatabase = noSession.GETDATABASE("", "")

'If Lotus Notes is not open then open the mail-part of it.
If noDatabase.IsOpen = False Then noDatabase.OPENMAIL
'Create the e-mail and the attachment.
Set noDocument = noDatabase.CREATEDOCUMENT
'Add values to the created e-mail main properties.
With noDocument
.Form = "Memo"
.SendTo = vaRecipient
.CopyTo = vaCCRecipient
.Subject = stSubject
.Body = vaMsg
.SaveMessageOnSend = True
End With
'Send the e-mail.
With noDocument
.PostedDate = Now()
.Send 0, vaRecipient
End With
'Release objects from the memory.
Set EmbedObject = Nothing
Set obAttachment = Nothing
Set noDocument = Nothing
Set noDatabase = Nothing
Set noSession = Nothing

Bob Phillips
06-27-2008, 01:34 AM
This should not be in Announcements.

Don't have Lotus Notes to try it (wouldn't touch it with yours), but try this



vaRecipient = Split(v)

Grigoras
06-27-2008, 02:26 AM
:rotlaugh: Thank You "Excel Guru".It's work.

lucas
06-27-2008, 07:40 AM
Moved to the Excel help forum.

Grigoras, please post in the appropriate forum.

Also, please mark your thread solved using the thread tools at the top of the page if you have your answer.