Excel - VBA - Email: ajouter signature (jpg)
Fermé
Misterbean1
Messages postés
53
Date d'inscription
vendredi 13 mai 2011
Statut
Membre
Dernière intervention
22 août 2017
-
26 déc. 2014 à 11:43
michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 - 27 déc. 2014 à 11:34
michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 - 27 déc. 2014 à 11:34
A voir également:
- Excel - VBA - Email: ajouter signature (jpg)
- Liste déroulante excel - Guide
- Si et excel - Guide
- Word et excel gratuit - Guide
- Comment creer un compte email - Guide
- Déplacer une colonne excel - Guide
2 réponses
michel_m
Messages postés
16603
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
16 décembre 2023
3 312
26 déc. 2014 à 11:48
26 déc. 2014 à 11:48
Bonjour,
Peut-^tre nous dire avec quelle yechnologie utilises tu pour tes mails
Outlook, CDO... ?
Peut-^tre nous dire avec quelle yechnologie utilises tu pour tes mails
Outlook, CDO... ?
Misterbean1
Messages postés
53
Date d'inscription
vendredi 13 mai 2011
Statut
Membre
Dernière intervention
22 août 2017
1
26 déc. 2014 à 14:32
26 déc. 2014 à 14:32
J'utilise Outlook. Voici un extrait de la macro et du module de Fonctions (functionModule)
j'espère que cela pourra vous aider à m'aider.
Merci.
*****************
Extrait de la macro:
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileName, "xxx@yyyy.be", "Subject", _
"Corps de texte Email" _
& vbNewLine & vbNewLine & "Mon nom", False
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"You Canceled the GetSaveAsFilename dialog" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If
End Sub
*****************
Exttrait de la fonction qui est liée:
Function RDB_Mail_PDF_Outlook(FileNamePDF As String, StrTo As String, StrBody As String, _
StrSubject As String, StrBody As String, Send As Boolean)
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = StrTo
.CC = ""
.BCC = ""
.Subject = StrSubject
.Body = StrBody
.Attachments.Add FileNamePDF
If Send = True Then
.Send
Else
.Display
End If
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Function
j'espère que cela pourra vous aider à m'aider.
Merci.
*****************
Extrait de la macro:
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileName, "xxx@yyyy.be", "Subject", _
"Corps de texte Email" _
& vbNewLine & vbNewLine & "Mon nom", False
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"You Canceled the GetSaveAsFilename dialog" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If
End Sub
*****************
Exttrait de la fonction qui est liée:
Function RDB_Mail_PDF_Outlook(FileNamePDF As String, StrTo As String, StrBody As String, _
StrSubject As String, StrBody As String, Send As Boolean)
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = StrTo
.CC = ""
.BCC = ""
.Subject = StrSubject
.Body = StrBody
.Attachments.Add FileNamePDF
If Send = True Then
.Send
Else
.Display
End If
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Function
27 déc. 2014 à 10:55
Voir ma réponse au post avec des détails concernant ma macro.
d'avance merci pour le support
27 déc. 2014 à 11:34
Je transfère dans le forum messagerie Outlook où tu auras peut-être + de chances