1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Sub PDF()
Dim Nom As String
Nom = ActiveWorkbook.Name
Nom = Left(Nom, InStrRev(Nom, ".") - 1)
If Environ("username") = "utilisateur1" Then
Sheets("Feuille1").ExportAsFixedFormat Type:=xlTypePDF, _
Filename:= "chemin1\" & Nom & ".pdf", _
Quality:= xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
If Environ("username") = "utilisateur2" Then
Sheets("Feuille1").ExportAsFixedFormat Type:=xlTypePDF, _
Filename:= "chemin2\" & Nom & ".pdf",
Quality:= xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
If Environ("username") = "utilisateur3" Then
Sheets("Feuille1").ExportAsFixedFormat Type:=xlTypePDF, _
Filename:= "chemin3\" & Nom & ".pdf",
Quality:= xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
End Sub |
Partager