Hello à tous,
Pouvez-m'aider afin que lors de l'envoi de mon fichier, celui ci enregistre et envoi uniquement le tableau complété et non toutes les cellules vides.
Private Sub CommandButton1_Click()
Dim Fichier As String
Dim Sh As Variant
Dim cp As Variant
Fichier = "C:\Users\ABENMOUSSA\Desktop\CA PANDORA.pdf" 'à adapter
Set Sh = ActiveSheet
Application.ScreenUpdating = False
Sh.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=Fichier, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Sheets.Add After:=Sheets(Sheets.Count)
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
For cp = .Item.Attachments.Count To 1 Step -1
.Item.Attachments(cp).Delete
Next cp
.Item.To = "cama@pandora.net;moam@pandora.net;MAXIME.VERFAILLIE@disney.com;ali.benmoussa@disney.com;marine.jacquemin@disney.com;OM.MARIANNIE@disney.com;MONICA.ANFOSSI@disney.com;SABINE.DUTEIL@disney.com;CARLA.COCINI@disney.com;MICHAEL.MANTEL@disney.com"
.Item.Subject = "Chiffres Pandora"
.Introduction = " Hello tout le monde," & vbCrLf & vbCrLf & "Ci-joint les chiffres Pandora" & vbCrLf & vbCrLf & "Cordialement," & vbCrLf & vbCrLf & "Team Legends"
.Item.Attachments.Add Fichier
.Item.Send
End With
Application.DisplayAlerts = False
ActiveSheet.Delete
Sh.Activate
Application.ScreenUpdating = True
End Sub
Bonne après-midi
Setila
Pouvez-m'aider afin que lors de l'envoi de mon fichier, celui ci enregistre et envoi uniquement le tableau complété et non toutes les cellules vides.
Private Sub CommandButton1_Click()
Dim Fichier As String
Dim Sh As Variant
Dim cp As Variant
Fichier = "C:\Users\ABENMOUSSA\Desktop\CA PANDORA.pdf" 'à adapter
Set Sh = ActiveSheet
Application.ScreenUpdating = False
Sh.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=Fichier, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Sheets.Add After:=Sheets(Sheets.Count)
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
For cp = .Item.Attachments.Count To 1 Step -1
.Item.Attachments(cp).Delete
Next cp
.Item.To = "cama@pandora.net;moam@pandora.net;MAXIME.VERFAILLIE@disney.com;ali.benmoussa@disney.com;marine.jacquemin@disney.com;OM.MARIANNIE@disney.com;MONICA.ANFOSSI@disney.com;SABINE.DUTEIL@disney.com;CARLA.COCINI@disney.com;MICHAEL.MANTEL@disney.com"
.Item.Subject = "Chiffres Pandora"
.Introduction = " Hello tout le monde," & vbCrLf & vbCrLf & "Ci-joint les chiffres Pandora" & vbCrLf & vbCrLf & "Cordialement," & vbCrLf & vbCrLf & "Team Legends"
.Item.Attachments.Add Fichier
.Item.Send
End With
Application.DisplayAlerts = False
ActiveSheet.Delete
Sh.Activate
Application.ScreenUpdating = True
End Sub
Bonne après-midi
Setila