ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SendMail File linked error (https://www.excelbanter.com/excel-programming/282342-sendmail-file-linked-error.html)

Linc

SendMail File linked error
 

I am using the following macro

!-- Start of Macro

Sub CopySave()
'
' Copy Save Print & Mail Macro
' Macro 11/3/2003 by LNC
'
Sheets("Incident_Report").Select
Sheets("Incident_Report").Copy
' ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True
Sheets("Incident_Report").Name = "Incident_Report_" & Cells(1, 12)
ActiveWorkbook.SaveAs "D:\DatatecReviews\Incidents\Incident "
Cells(1, 12)
' ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Set wb = ActiveWorkbook
With wb
.SendMail ", _
"Incident Report"
.Close False
End With
Application.ScreenUpdating = True
Sheets("Incident_Log").Select
Cells(1, 1).Select

End Sub

!-- End of Macro

When the email arrives at the destination the file is attached and thi
is a good thing, just what I wanted in fact. However, upon opening th
file Excel is asking for the location of the original document.
don't want it to do this. Can someone help me with this.

Thanks

Lin

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com