Hello,
I have this code that send my file generated with a dynamic table and I want to send only as values , someone knows how to accomplish this?
Sub WorksheetLoop2()
Dim Current As Worksheet
For Each Current In Worksheets
Dim attBook$
attBook = Environ("temp") & "\" & Current.[A4] & ".xlsx"
Current.Copy
"""ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value""
If Dir(attBook) <> "" Then Kill attBook
With ActiveWorkbook
.SaveAs Filename:=attBook, FileFormat:=51
.Close False
End With
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Current.[a1]
.CC = Current.[a2]
.BCC = ""
.Subject = Current.[A3]
.Body = "Buen dia, se adjunta reporte de ventas"
.Attachments.Add attBook
If .To = "" Then
.To = ""
.CC = ""
.Body = "Error, "" " & Current.[A4]
End If
.send
End With
Set OutMail = Nothing
Set OutApp = Nothing
Next
MsgBox " "" " & Date
End Sub
tnks regards