my goal is to create a VBA code that would:
1) Create/Display a new email message (Without sending it)
2) Take all the information that is already imputed in my excel sheet:
Sendto - Sheet1 - Cell - B5
CC - Sheet1 - Cell - B7
Subject - Sheet1 - Cell - B9
Body - Sheet1 - Cell - B12 & B14
The current problem that I have with the code that I created is that when I try to add strings that connect to the excel sheet they return as "0" when the email is generated:
Here is my code:
Sub send_email()
Dim outlookApp As Outlook.Application
Dim myMail As Outlook.MailItem
Dim Source_File As String
Set outlookApp = New Outlook.Application
Set myMail = outlookApp.CreateItem(olMailItem)
myMail.To = Str(Sheet1.Cells(2, 5))
myMail.CC = Str(Sheet1.Cells(2, 7))
myMail.Subject = Str(Sheet1.Cells(2, 9))
myMail.Body = Str(Sheet1.Cells(2, 12)) & Str(Sheet1.Cells(2, 14))
myMail.Display True
End Sub
Ideally, this would create message that has all of the information inputted from the excel sheet's cells
I really appreciate the help!