Bonjour le forum
J'ai une macro qui fonctionne à merveille, le seul HIC, c'est qu'elle éteint le pavé numérique, c'est assez embêtant
pourriez vous m'aider
Sub envoi_email()
Dim messagerie As Object
Dim courriel As Object
Dim nompdf As String
Dim Texte As String
Dim fich As String
Select Case ActiveSheet.[C1]
Case "qso": fich = "C:\Users\Documents\Lescury\petron\laderne.pdf"
Case "suf": fich = "C:\Users\Documents\Lescury\petron\herdine.pdf"
End Select
nompdf = Environ("Temp") & "\" & "pièce_jointe"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=nompdf & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Range("texte").Copy
Texte = Texte & "Veuiller trouver en PJ toutes les informations relative à votre dossier" & vbCrLf & vbCrLf '& Range("U21") & vbCrLf & vbCrLf
Texte = Texte & [C11] & vbCrLf & vbCrLf
Texte = Texte & [C12]
Texte = Texte & vbCrLf
Texte = Texte & [B13]
Texte = Texte & vbCrLf & vbCrLf & vbCrLf
Set messagerie = CreateObject("Outlook.Application")
Set courriel = messagerie.CreateItem(0)
With courriel
.To = Range("destinataire")
.Subject = Range("titre")
.Attachments.Add fich
.Body = Texte
.display
End With
Application.Wait (Now + TimeValue("0:00:02"))
SendKeys "^v", True
Application.CutCopyMode = False
Set courriel = Nothing
Set messagerie = Nothing
Sheets("Recap").Select
End Sub