Bonsoir à tous,
Du coup c'est bon, j'envoie une copie du tableau dans le corps de texte, mais il faut que j'ajoute en piece jointe un tableau excel d'une autre feuille du classeur.
Voici le code actuel :
'Dimensions and prep
Dim SaveName As Range
'Application.ScreenUpdating = False
'Sending an email with the attachment
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Sheets("xxxxxxx").Range("D5").Value
.CC = Sheets("xxxxxxx").Range("D6").Value
.BCC = ""
.Subject = Sheets("xxxxxxxx").Range("D8").Value
Dim oObjetWord As Object
Set oObjetWord = .GetInspector.WordEditor
Range("A10:E45").Select
Selection.Copy
oObjetWord.Range(0).Paste
.Attachments.Add vPJ
.Display
End With
'Deletes outlook from cache
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Auriez-vous une idée de comment proceder ?