Oberon70
Board Regular
- Joined
- Jan 21, 2022
- Messages
- 160
- Office Version
- 365
- Platform
- Windows
Hi,
I have the below code, but the signature doesn't appear when I run it? Any idea why?
I have the below code, but the signature doesn't appear when I run it? Any idea why?
VBA Code:
Sub email()
Dim source_file, to_emails, cc_emails As String
Dim i, j As Integer
Dim strFile As String
Dim filelocation As String
Dim fCell As String
Dim OApp As Object, OMail As Object, signature As String
Set OApp = CreateObject("Outlook.Application")
Set OMail = OApp.CreateItem(0)
Set ws = Sheets("Report")
fCell = ActiveCell.Row
filelocation = Sheets("Report").Range("S" & fCell)
ws.Range("S" & fCell).Select
source_file = filelocation
'signature = OMail.Body
With OMail
.Display
.To = "TimeLord@Tardis.com"
.Subject = "What Century
.Attachments.Add source_file
.Body = "Hi Doctor," & vbNewLine & vbNewLine & "Would you please let me know what time and place we are visiting?" & vbNewLine & vbNewLine & "Thanks"
.Display
'.Send
End With
Set OMail = Nothing
Set OApp = Nothing
End Sub