J
John
I read a recent post in creating a PDF document and was wondering a couple
of things. Code below is taken rom Ron De Bruin and e-mails a sheet called
"E-Mail" in XL format. Is it possible to tweak this to send as a PDF format?
I've tried just changing the ".xls" part below to ".pdf", it e-mails out
fine but you can't open up the file. It returns a message "it is not a
supported file or is corrupted"
Sub Mail_Report()
Dim wb As Workbook
Dim strdate As String
Dim MyArr As Variant
strdate = Format(Now, "dd-mm-yy h-mm-ss")
Application.ScreenUpdating = False
Sheets("E-Mail").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Part of " & ThisWorkbook.Name _
& " " & strdate & ".xls"
MyArr = Sheets("E-Mail").Range("BA2:BA15")
.SendMail MyArr, Sheets("E-Mail").Range("BA1").Value
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
End Sub
of things. Code below is taken rom Ron De Bruin and e-mails a sheet called
"E-Mail" in XL format. Is it possible to tweak this to send as a PDF format?
I've tried just changing the ".xls" part below to ".pdf", it e-mails out
fine but you can't open up the file. It returns a message "it is not a
supported file or is corrupted"
Sub Mail_Report()
Dim wb As Workbook
Dim strdate As String
Dim MyArr As Variant
strdate = Format(Now, "dd-mm-yy h-mm-ss")
Application.ScreenUpdating = False
Sheets("E-Mail").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Part of " & ThisWorkbook.Name _
& " " & strdate & ".xls"
MyArr = Sheets("E-Mail").Range("BA2:BA15")
.SendMail MyArr, Sheets("E-Mail").Range("BA1").Value
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
End Sub