Insertion signature mail vba
gnioler
Messages postés
88
Date d'inscription
Statut
Membre
Dernière intervention
-
gnioler Messages postés 88 Date d'inscription Statut Membre Dernière intervention -
gnioler Messages postés 88 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
j'ai une macro qui me permet d'envoyer un fichier excel en pdf par mail qui marche tres bien
par contre il ne me mets pas ma signature automatique qu'il y a quand je fait un nouveau mail
je ne peut pas la mettre dans la macro car suivant qui redige le mail la signature n'est pas la meme
voici ma macro
Sub PDF()
'
Dim oBjMail
Dim pj As String
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"S:\DEVIS\EN PDF\"& [E17] & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False _
pj = "S:\DEVIS\EN PDF\ " & [E17] & ".pdf"
Set ObjOutlook = New Outlook.Application
Set oBjMail = ObjOutlook.CreateItem(olMailItem)
If pj = "Faux" Then Exit Sub
If VarType(pj) = vbBoolean Then Exit Sub
With oBjMail
.To = Cells(21, 5).Value
.CC = ""
.Subject = "offre de prix "
.Attachments.Add pj
.Body = "Bonjour, " & vbCrLf & vbCrLf _
& "vous trouverez ci joint l'offre de prix " & vbCrLf _
& "je reste à votre disposition pour tous renseignement complémentaire " & vbCrLf & vbCrLf _
Kill "S:\DEVIS\EN PDF\" & [E17] & ".pdf"
.Display
End With
End Sub
merci pour vos reponse
PS quand j'enleve le passage
.body
il me mets ma signature
j'ai une macro qui me permet d'envoyer un fichier excel en pdf par mail qui marche tres bien
par contre il ne me mets pas ma signature automatique qu'il y a quand je fait un nouveau mail
je ne peut pas la mettre dans la macro car suivant qui redige le mail la signature n'est pas la meme
voici ma macro
Sub PDF()
'
Dim oBjMail
Dim pj As String
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"S:\DEVIS\EN PDF\"& [E17] & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False _
pj = "S:\DEVIS\EN PDF\ " & [E17] & ".pdf"
Set ObjOutlook = New Outlook.Application
Set oBjMail = ObjOutlook.CreateItem(olMailItem)
If pj = "Faux" Then Exit Sub
If VarType(pj) = vbBoolean Then Exit Sub
With oBjMail
.To = Cells(21, 5).Value
.CC = ""
.Subject = "offre de prix "
.Attachments.Add pj
.Body = "Bonjour, " & vbCrLf & vbCrLf _
& "vous trouverez ci joint l'offre de prix " & vbCrLf _
& "je reste à votre disposition pour tous renseignement complémentaire " & vbCrLf & vbCrLf _
Kill "S:\DEVIS\EN PDF\" & [E17] & ".pdf"
.Display
End With
End Sub
merci pour vos reponse
PS quand j'enleve le passage
.body
il me mets ma signature
A voir également:
- Vba insérer signature outlook
- Signature électronique word - Guide
- Publipostage mail - Accueil - Word
- Windows live mail - Télécharger - Mail
- Signature automatique gmail - Guide
- Live.fr mail - Forum Mail
1 réponse
resolut dans le forum ci dessous
https://forums.commentcamarche.net/forum/affich-24174748-envoyer-excel-en-pdf-via-outlook-vba#p24190978
https://forums.commentcamarche.net/forum/affich-24174748-envoyer-excel-en-pdf-via-outlook-vba#p24190978