ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Bonjour, Après le pointage de vos éléments de préfacturation, les anomalies en PJ ont été constatées. Merci de bien vouloir effectuer les vérifications qui s'imposent avant de rédiger vos factures sur chacun des comptes sur la base des montants ci-dessous. Cordialement"
.Item.To = "toto_danil@contoso.com"
.Item.CC = ""
.Item.Subject = "Pointage Préfac GEFCO Décade 1"
.Item.Attachments.Add = "c:\trash2\Pointage anomalies Préfac GEFCO Décade 1.xlsx"
.Item.Send
End With
That :
select a sheet
copy that sheet to a new worksheet
Save it to a new worksheet name
Copy and paste a selection
save it
close the active workboot
I got th error message "execution error 440"
on the yellow line on the file attached
This page may help:
[ https://msdn.microsoft.com/en-us/library/office/ff869553.aspx ]