Bonjour, j'ai ce code VBA et je souhaiterai passer la variable 'Nom' en gras et en Arial.
Est-ce que quelqu'un sait comment faire ?
Merci d'avance
'Création de la macro d'export pdf
Sub Export_PDF(eMAIL As String, Nom As String)
' Nécessite la référence : Microsoft Outlook 1x Object Library
Dim olMail As MailItem
Dim strHTML As String
Dim CurFile As String
Dim WSC, WSV As Worksheet
Dim myolapp As Outlook.Application
Set myolapp = CreateObject("Outlook.Application")
Set WSC = Sheets("Commissionnement")
Set WSV = Sheets("VADEURS")
Set olMail = myolapp.CreateItem(olMailItem)
' "C:\Users\Thierry\AppData\Local\Temp\MaFeuille.pdf "
CurFile = ThisWorkbook.Path & "\" & "Remunération " & WSC.Range("B7").Value & ".Pdf"
WSC.Range("A5:Q107").ExportAsFixedFormat Type:=xlTypePDF, Filename:=CurFile, _
Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
With olMail
.To = eMAIL
'.CC = "name2@domain2.com"
.Subject = "Rémunération " & WSC.Range("B7").Value
.HTMLBody = "<HTML><BODY><font size=4 FACE=Arial>Bonjour, <br> <br>veuillez trouvez ci-joint <b>le fichier PDF avec votre rémunération.</b> </br> </br><br><br> Cordialement,</br><br> </BODY></HTML>" & [b]Nom[/b]
.Attachments.Add CurFile
'.Attachments.Add "c:\My Documents\book.doc"
.Display
.Send
End With
' Effacer les variables objets
Set olMail = Nothing
Set myolapp = Nothing
'myolapp.Quit
End Sub