Sub Export_pdf()
Dim Chemin As String
NomDossier=Application.InputBox("Nom du dossier","Création du dossier","Entrer le nom du dossier")
Chemin="\\Xsmlssso10\mls\public\6- ADMINISTRATIF\0 Commande\commandes passées\"& NomDossier & "\"
On error resume next
Dossierexistant=Getattr(dossier) and vbDirectory
if Dossierexistant=false then
mkdir(Chemin)
End if
Activesheet.exportasfixedformat type=xltypePDF, Filename:=
Chemin & "\" & Range("X7").Value &".pdf", Quality:=xkqualitystandard, IncludeDocProperties:=True, Ignoreprintareas:=false, from:=1, to:=1,_
openafterpublish:=false
Msgbox ("Le PDF a été crée")
End Sub