Hi khoward
the spreadsheets that I e-mail to clients would have more
impact if I could eliminate all the extra area.
One way
Mail it to yourself to see the result
Sub Mail_Selection()
Dim strDate As String
Dim Addr As String
Dim rng As Range
' Exit if multiple worksheets or multiple ranges are selected.
If ActiveWindow.SelectedSheets.Count > 1 Or _
Selection.Areas.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
Addr = Range("Print_Area").Address
ActiveSheet.Copy
ActiveSheet.Pictures.Delete
With Cells
.EntireColumn.Hidden = False
.EntireRow.Hidden = False
End With
Range(Addr).Select
Set rng = Selection
Application.GoTo rng, True
With rng.EntireColumn
.Hidden = True
rng(1).EntireRow.SpecialCells(xlVisible).EntireColumn.Clear
rng(1).EntireRow.SpecialCells(xlVisible).EntireColumn.Hidden _
= True
.Hidden = False
End With
With rng.EntireRow
.Hidden = True
rng(1).EntireColumn.SpecialCells(xlVisible).EntireRow.Clear
rng(1).EntireColumn.SpecialCells(xlVisible).EntireRow.Hidden _
= True
.Hidden = False
End With
Application.GoTo rng, True
rng.Cells(1).Select
strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")
ActiveWorkbook.SaveAs "Part of " & ThisWorkbook.Name _
& " " & strDate & ".xls"
ActiveWorkbook.SendMail "(e-mail address removed)", _
"This is the Subject line"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
Application.ScreenUpdating = True
End Sub