How do I set up a macro that will attach a workbook to an e-mail without sending it automatticly
I use the following to send e-mail auto for me;
Sub EMail_Workbook_SCM()
If MsgBox("Click OK to send report", vbOKCancel, _
"You are about to send this report to Supply Class Management") = vbCancel Then Exit Sub
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim wbname As String
ActiveWorkbook.Save
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
wbname = "C:/" & wb1.Name & " " & _
Format(Now, "dd-mm-yy") & ".xls"
wb1.SaveCopyAs Filename:=wbname
Set wb2 = Workbooks.Open(wbname)
With wb2
.SendMail "
[email protected]"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
End Sub