Sub Export_en_PDF()
'
NomDossier = Application.InputBox("Non du dossier", "Création du dossier", "Entrer le nom du dossier")
Chemin = "F:\Frais\Archives\" & NomDossier & "\"
On Error Resume Next
' Dossierexistant = GetAttr(dossier) And vbDirectory
Dossierexistant = GetAttr(Chemin) And vbDirectory
If Dossierexistant = False Then MkDir (Chemin)
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Chemin & Range("E2").Value & ".pdf", _
includedocproperties:=True, _
quality:=xlqualitystandard, _
ignoreprintareas:=False, _
from:=1, to:=2, _
openafterpublish:=False
MsgBox ("le PDF a été créé")
End Sub