Hi I have a sheet "Email MTD Recap" that we email the range "B2:G24". But for some reason the sheet looses all formating, hidden rows... using Airmail for iOS only. They havent been able to figure things out. Works perfect in all other mobile and desktop apps.
So my solution for now would be to send the selected range as a picture to be viewed on their phones. But I'm having issues with the code.
Below is what we use already what do i need to change to have it send it as a picture?
Sub Send_Range_EmailMTDRecap_with_MailEnvelope()
'Working in Excel 2002-2016
Dim AWorksheet As Worksheet
Dim Sendrng As Range
Dim rng As Range
On Error GoTo StopMacro
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'Fill in the Worksheet/range you want to mail
'Note: if you use one cell it will send the whole worksheet
Set Sendrng = Worksheets("EMAIL MTD RECAP").Range("B2:G24")
'Remember the activesheet
Set AWorksheet = ActiveSheet
With Sendrng
' Select the worksheet with the range you want to send
.Parent.Select
'Remember the ActiveCell on that worksheet
Set rng = ActiveCell
'Select the range you want to mail
.Select
' Create the mail and send it
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
' Set the optional introduction field thats adds
' some header text to the email body.
.Introduction = "Hi below is the MTD recap comparing TY vs. LY and same stores YOY."
With .Item
.To = "Steve@apple.com"
.CC = ""
.BCC = ""
.Subject = "MTD RECAP " & Format(Date, "MMMM DD/YY")
.Send
End With
End With
'select the original ActiveCell
rng.Select
End With
'Activate the sheet that was active before you run the macro
AWorksheet.Select
StopMacro:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
ActiveWorkbook.EnvelopeVisible = False
End Sub
Thanks.
PS we also use CDO to hide the sent emails fro staff. I can add that code to it after.
So my solution for now would be to send the selected range as a picture to be viewed on their phones. But I'm having issues with the code.
Below is what we use already what do i need to change to have it send it as a picture?
Sub Send_Range_EmailMTDRecap_with_MailEnvelope()
'Working in Excel 2002-2016
Dim AWorksheet As Worksheet
Dim Sendrng As Range
Dim rng As Range
On Error GoTo StopMacro
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'Fill in the Worksheet/range you want to mail
'Note: if you use one cell it will send the whole worksheet
Set Sendrng = Worksheets("EMAIL MTD RECAP").Range("B2:G24")
'Remember the activesheet
Set AWorksheet = ActiveSheet
With Sendrng
' Select the worksheet with the range you want to send
.Parent.Select
'Remember the ActiveCell on that worksheet
Set rng = ActiveCell
'Select the range you want to mail
.Select
' Create the mail and send it
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
' Set the optional introduction field thats adds
' some header text to the email body.
.Introduction = "Hi below is the MTD recap comparing TY vs. LY and same stores YOY."
With .Item
.To = "Steve@apple.com"
.CC = ""
.BCC = ""
.Subject = "MTD RECAP " & Format(Date, "MMMM DD/YY")
.Send
End With
End With
'select the original ActiveCell
rng.Select
End With
'Activate the sheet that was active before you run the macro
AWorksheet.Select
StopMacro:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
ActiveWorkbook.EnvelopeVisible = False
End Sub
Thanks.
PS we also use CDO to hide the sent emails fro staff. I can add that code to it after.