Results 1 to 4 of 4
  1. #1
    bignate is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    47

    Question How do I add multiple recipients to email code I am using?

    Hi
    How do I add multiple recipients to the '.To' line in the code below?

    Dim appOutLook As Outlook.Application
    Dim MailOutLook As Outlook.MailItem
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)
    With MailOutLook
    .BodyFormat = olFormatRichText
    If Me.txtDepartment = "IT" Then
    .To = "my email"
    End If
    .Subject = "hi"
    .HTMLBody = "hi"
    .send


    End With

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    .To = "my email; another email; yet another email"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bignate is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    47
    Thanks, nice website btw.
    What I was trying to do before was "my email"; "another email"; "yet another email", I didnt realise it all had to be in the quotes

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-12-2013, 02:19 PM
  2. Replies: 1
    Last Post: 02-14-2013, 11:18 PM
  3. Replies: 2
    Last Post: 12-07-2011, 07:48 AM
  4. Replies: 0
    Last Post: 12-01-2011, 01:38 PM
  5. Replies: 2
    Last Post: 08-17-2010, 10:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums