OFFLINEX
01-15-2023, 07:52 PM
So I'm trying to send a .oft email to a large list of .bcc emails but I cant seem to get the code to pull a range If I define the range like A1:A5 I get this object does not support this method . What do I need to put into the .bcc to get an entire column of addresses? I also need to do this a few times with different .oft's for different columns of email addresses.
This is my code so far:
Sub EmailTemplate1()
Dim outlookapp As Object
Dim outlookmailitem As Object
Dim cell As range
Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.CreateItemFromTemplate("C:\Users\John\Desktop\Template.oft")
With outlookmailitem
.BCC = range.(B2)
.Subject = "Test"
.Display
'.send
End With
End Sub
This is my code so far:
Sub EmailTemplate1()
Dim outlookapp As Object
Dim outlookmailitem As Object
Dim cell As range
Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.CreateItemFromTemplate("C:\Users\John\Desktop\Template.oft")
With outlookmailitem
.BCC = range.(B2)
.Subject = "Test"
.Display
'.send
End With
End Sub