Hi,
I'm working on this coding. It should generate email according to the list I provided in Excel. The code goes like this
Sub GEMail()
Dim myOlApp As New outlook.Application
Dim myItem As outlook.MailItem
Set myItem = myOlApp.CreateItem(olMailItem)
Set myrecipient = myItem.Recipients.Add(Worksheets("Sheet1").Range("B5"))
Set myrecipient = myItem.Recipients.Add(Worksheets("Sheet1").Range("C5"))
'B5 is the email i want to send to
'B6 is the email i want to cc to
myrecipient.Type = olCC
End Sub
How to command the VB to seek for the next range B6, C6, B7, C7 onwards?
TQ
I'm working on this coding. It should generate email according to the list I provided in Excel. The code goes like this
Sub GEMail()
Dim myOlApp As New outlook.Application
Dim myItem As outlook.MailItem
Set myItem = myOlApp.CreateItem(olMailItem)
Set myrecipient = myItem.Recipients.Add(Worksheets("Sheet1").Range("B5"))
Set myrecipient = myItem.Recipients.Add(Worksheets("Sheet1").Range("C5"))
'B5 is the email i want to send to
'B6 is the email i want to cc to
myrecipient.Type = olCC
End Sub
How to command the VB to seek for the next range B6, C6, B7, C7 onwards?
TQ