Email CC to various people

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mannyf50
    New Member
    • Feb 2008
    • 6

    Email CC to various people

    Hey guys, im trying to get an email sent to various people, here is the code im currently using! please help ive been going crazy trying to find a way to send it to various people instead of just one

    Private Sub Command0_Click( )
    'Create some object variables for the various Notes objects
    Dim NotesDB As Object
    Dim NotesDoc As Object
    Dim NotesRTF As Object
    Dim NotesSession As Object
    Dim txtDate
    Dim strTo, strNCMR


    'Get NCM#
    'strNCMR = Me.txtRecID
    'Define who to send e-mail to
    strTo = "Email address" 'strQM

    'Use Create object to instantiate a Notes session object
    Set NotesSession = CreateObject("N otes.Notessessi on")

    'Instantiate NotesDB object from method off NotesSession
    Set NotesDB = NotesSession.ge tdatabase("", "")
    NotesDB.openmai l
    'Create new Notes document
    Set NotesDoc = NotesDB.created ocument
    'Send to strTo and set Subject of e-mail
    Call NotesDoc.replac eitemvalue("Sen dto", strTo)
    Call NotesDoc.replac eitemvalue("Sub ject", "NCMR # " & strNCMR)
    'Creating the Body of the E-Mail
    Set NotesRTF = NotesDoc.create richtextitem("b ody")
    Call NotesRTF.append text("NCMR # " & strNCMR & " has been issued and needs your attention.")
    'Save e-mail
    NotesDoc.SAVEME SSAGEONSEND = True
    'Send the e-mail
    Call NotesDoc.Send(F alse)
    'Destroy the Notes objects
    Set NotesSession = Nothing
    MsgBox "Email sent.", vbOKOnly + vbInformation, "Email "
    End Sub
  • cori25
    New Member
    • Oct 2007
    • 83

    #2
    What email application are you sending from? outlook, groupwise??

    Comment

    • Mannyf50
      New Member
      • Feb 2008
      • 6

      #3
      Originally posted by cori25
      What email application are you sending from? outlook, groupwise??
      sending through lotus notes

      Comment

      Working...