Salut
Ne serait-ce pas plus tôt
sNom = "TS" & "_" & sheets("TEMPS").Range("E2").value & ".pdf"
Sinon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub ExportEnPdf()
Dim sChemin As string, sDossier As string, sNom As String, sFichier As string
Worksheets("Feuil1").Activate
sDossier = "P:\Gensms015\BE\PLANNING\TIMESHEETS\WEEKS\"
sNom = "TS" & "_" & sheets("TEMPS").Range("E2").value
sFichier = sNom & ".pdf"
sChemin = sDossier & sFichier
Application.ScreenUpdating = False
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=strPathFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Application.ScreenUpdating = True
End Sub |
EDIT : votre classeur se trouve où exactement sur P:\ ?
Partager