I want to have the workbook protected to start with, but it will need to be
unprotected early on in the marcro for the macro to work. I will also need
for it to be protected again at the end.
Sub EMail()
'
' EmailCHECKORDER Macro
' Macro recorded
'
'Sub Mail_ActiveSheet_Outlook()
Calculate
Dim OutApp As Object
Dim OutMail As Object
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "yyyy-mm-dd")
Application.ScreenUpdating = False
Sheets("Emailed").Visible = True
Sheets("Emailed").Select
Sheets("Emailed").Copy
ActiveSheet.Unprotect
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Range("F2").Select
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Set wb = ActiveWorkbook
With wb
.SaveAs "ASDF New Accounts.xls"
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(o)
With OutMail
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "New Accounts Activity"
.Body = "When the file opens up, DO NOT UPDATE. Also, Please do
a 'Paste Special' and choose 'Values and Number Formats'"
.Attachments.Add wb.FullName
.Display
End With
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
Sheets("Emailed").Select
ActiveWindow.SelectedSheets.Visible = False
Set OutMail = Nothing
Set OutApp = Nothing
End Sub