Bonjour matlatarte,
Comment sont définis zone_pdf et sFichier ?
Est ce que sFichier correspond à chemin correct sur ce PC ?
Pouvez vous envoyer le fichier ou tout du moins le code complet de la macro ?
voici la macro complète:
Dim wk_file As Workbook
Dim ws_data As Worksheet
Dim zone_pdf As Range
Set wk_file = ActiveWorkbook
Set ws_data = wk_file.Worksheets(1)
Dim Rep As Long, sFichier As String
Dim FSO As Object
Set zone_pdf = ws_data.Range(ws_data.Cells(1, 1), ws_data.Cells(66, 20))
Set FSO = CreateObject("Scripting.FileSystemObject")
sFichier = "P:\Google Drive\COMPTE RENDUS\Test MultiBruit\" & Range("A4")
Set FSO = Nothing
Application.ScreenUpdating = False
With ws_data.PageSetup
.PaperSize = xlPaperA4
.PrintArea = zone_pdf.Address(0, 0)
.Orientation = xlPortrait
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
zone_pdf.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sFichier, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Application.ScreenUpdating = True
Rep = MsgBox("Voulez-vous aussi imprimer le C.R. ?", vbYesNo)
If Rep = vbYes Then
ActiveSheet.PrintOut
End If
et oui le chemin est correct sur les 2 PC et pas d'histoire de lecture seule