anthonymedz
Board Regular
- Joined
- Jan 30, 2015
- Messages
- 69
Hi guys,
Good day.
Can you help me on this.
When I click the command button the outlook mail will automatically appear with an attachment, however I want the excel sheet on that excel file have been deleted(Sheet 1 or 2).
Code:
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<H3><B>Hi Team,</B></H3>" & _
"Please see the attached shift report for your reference.<br>" & _
On Error Resume Next
With OutMail
.Display
.To = "medz_anthony"
.CC = ""
.BCC = ""
.Subject = "FM-Gaming & Podium Operation Daily Departmental Report_3rd Shift"
.HTMLBody = strbody & "<br>" & .HTMLBody
.Attachments.Add ActiveWorkbook.FullName
'.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Thanks for your advanced help.
Regards,
Anthonymedz
Good day.
Can you help me on this.
When I click the command button the outlook mail will automatically appear with an attachment, however I want the excel sheet on that excel file have been deleted(Sheet 1 or 2).
Code:
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<H3><B>Hi Team,</B></H3>" & _
"Please see the attached shift report for your reference.<br>" & _
On Error Resume Next
With OutMail
.Display
.To = "medz_anthony"
.CC = ""
.BCC = ""
.Subject = "FM-Gaming & Podium Operation Daily Departmental Report_3rd Shift"
.HTMLBody = strbody & "<br>" & .HTMLBody
.Attachments.Add ActiveWorkbook.FullName
'.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Thanks for your advanced help.
Regards,
Anthonymedz