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

bignate

Registered User.
Local time
Today, 11:10
Joined
Aug 28, 2013
Messages
34
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
 
As answered elsewhere:

.To = "my email; another email; yet another email"
 
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
 
No problem, and thanks!
 

Users who are viewing this thread

Back
Top Bottom