Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

code to send CC to multiple receivers

Posted on 2004-08-27
2
745 Views
Last Modified: 2013-12-18
I am writing VB program to send email by Lotus Notes and the code is attached below. I would like to send CC to multiple receivers. How to do that?

PS: I cannot do that with comma (,) ie:
MyCopyTo = "first@mail.com, second@mail.com, third@mail.com"

Thanks

The Code:

    On Error GoTo LotusError
    Dim OLESess As Object
    Dim OLEDB As Object
    Set OLESess = CreateObject("Notes.Notessession")
    Set OLEDB = OLESess.GetDatabase(LotusNotesServer, LotusNotesPath)

    On Error GoTo NotesError
    Const EMBED_ATTACHMENT = 1454
    ' Creates a new document/message.
    Dim Doc As Object
    Dim NItem As Object
    Set Doc = OLEDB.CreateDocument
    With Doc
        ' creates body of message and populates headers
        Set NItem = Doc.CreateRichTextItem("BODY")
        .Form = "Memo"
        .Subject = MySubject
        .SendTo = MySendTo
        .CopyTo = MyCopyTo       <<<<<<<-----------------
        .Body = MyBody
        .postdate = Date
        .SaveMessageOnSend = True
        .PostedDate = Now
        Call NItem.EmbedObject(EMBED_ATTACHMENT, "", MyAttach)
        .Send False
    End With
   
 
0
Comment
Question by:leekf
2 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 125 total points
ID: 11910605
You can try with MyCopyTo as an array of strings, not just a string.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11912740
> .CopyTo = MyCopyTo       <<<<<<<-----------------
Replace the above line with this

.CopyTo = Split(MyCopyTo, ",")

~Hemanth
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question