Hello
Can any developer help me convert this code to work without adding a reference to the outlook?
is possible
Can any developer help me convert this code to work without adding a reference to the outlook?
is possible
Code:
Dim EmailApp As Outlook.Application
Dim Source As String
Set EmailApp = New Outlook.Application
Dim EmailItem As Outlook.MailItem
Set EmailItem = EmailApp.CreateItem(olMailItem)
EmailItem.to = Cells(i, 1)
EmailItem.CC = "hello@gmail.com"
EmailItem.BCC = "hhhh@gmail.com"
EmailItem.Subject = "Test Email From Excel VBA"
EmailItem.HTMLBody = "Hi," & vbNewLine & vbNewLine & "This is my first email from Excel" & vbNewLine & vbNewLine & "Regards,"
Source = ThisWorkbook.FullName
EmailItem.Attachments.Add
EmailItem.Display