Enregister en Pdf sous nulmero BL et Nom Client

Bonjour à tous.

Je me remet à vous pour m'aider a enregistrer avec macro VBA la feuielle Active "Facturation" sous format Excel avec comme nom de clsseur le Num BL concatener au Nom du client.

Sur l'exemple en pièce jointe je devrais obtenir "BL19S01-00376 - CLIENT001"

Merci à tous.

11fact-fep.xlsm (19.44 Ko)

Bonjour,

Essaie ainsi :

Public Sub CreatePDF()
Dim strPath As String, strFilename As String
    strPath = ActiveWorkbook.Path & Application.PathSeparator
    With ActiveSheet
        strFilename = .Cells(6, 3).Value & " - " & .Cells(11, 3).Value & ".pdf"
        .ExportAsFixedFormat Type:=xlTypePDF, _
                             Filename:=strPath & strFilename, _
                             Quality:=xlQualityStandard, _
                             IncludeDocProperties:=True, _
                             IgnorePrintAreas:=False, _
                             OpenAfterPublish:=False
    End With
End Sub

Bonjour Jean-Eric.

Merci pour votre réponse, ça marche très bien, je reviendrais vers vous au besoin.

Merci encore

Rechercher des sujets similaires à "enregister pdf nulmero nom client"