Email Upgraded from Office 2000 to Office 2007

S

Steved

Hello from Steved

I've upgraded from Office 2000 to Office 2007

Below has 2 issues firstly when I email to a client they can open the file
only to get a corrupt worksheet and secondly Kill .FullName gets highlited
please help.

Yes I save the files as a Excel 97-2003 Workbook, as othe only have either
Office 2000 or Office 2003

Sub AnnullEmail()
Dim wb As Workbook
Dim strdate As String
Dim Shname As Variant
Dim Addr As Variant
Dim N As Integer

strdate = Format(Now, "dd-mm-yy h-mm-ss")
Shname = Array("1-City", "2-Roskill", "3-Papakura", "4-Wiri", "5-Shore",
"6-Orewa", "7-Swanson", "8-Panmure")
Addr = Array("1-Depot", "2-Depot", "4-Depot", "4-Depot", "5-Depot",
"5-Depot", "7-Depot", "1-Depot")

Application.ScreenUpdating = False

For N = LBound(Shname) To UBound(Shname)
Sheets(Shname(N)).Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Sheet " & Shname(N) _
& " " & strdate & ".xls"
.SendMail Addr(N), _
"Depot Annulments"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Next N
Application.ScreenUpdating = True
End Sub

Thankyou.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top