Insertion signature mail vba
gnioler
Messages postés
91
Statut
Membre
-
gnioler Messages postés 91 Statut Membre -
gnioler Messages postés 91 Statut Membre -
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
- Windows live mail - Télécharger - Mail
- Changer signature gmail - Guide
- Kindle paperwhite signature edition 2024 - Accueil - Tablettes
- Publipostage mail - Accueil - Word
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