bonjour

j'utilise une macro qui fonctionne très bien pour l'envoi d'un fichier cette fonction est attaché a un bouton
malheureusement ce fichier ne devant pas etre transformé, je souhaiterai qu'il soit transformé en pdf avant envoi

quelqu'un pourrait il m'aider car mes connaissances sont très sommaires

ci dessous mon code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Sub Mail_workbook_Outlook_1()
'Working in Excel 2000-2013
'This example send the last saved version of the Activeworkbook
'For Tips see: <a href="http://www.rondebruin.nl/win/winmail/Outlook/tips.htm" target="_blank">http://www.rondebruin.nl/win/winmail/Outlook/tips.htm</a>
    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 = ""
        .CC = ""
        .BCC = ""
        .Subject = " "
        .Body = "Bonjour Veuillez trouver ci joint une fiche  "
        .Attachments.Add ActiveWorkbook.FullName
        'You can add other files also like this
        '.Attachments.Add ("C:\test.txt")
        .Send   'or use .Display
    End With
    On Error GoTo 0
 
    Set OutMail = Nothing
    Set OutApp = Nothing
    MsgBox "message envoyé avec succés"
End Sub
en vous remerciant