Professional Documents
Culture Documents
Imprimer
Imprimer
Set wb = ThisWorkbook
Set feuille = wb.Sheets("Devis")
dossierAdresse = Sheets("Parameters").Range("K9").Value & "\"
nomDocument = feuille.Range("J10").Value
Application.ScreenUpdating = False
With feuille.PageSetup
.PrintArea = plage
.FitToPagesTall = 1
.FitToPagesWide = 1 'Set FitToPagesWide to 1
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
End With
With feuille
iVis = .Visible
.Visible = xlSheetVisible
.Activate
.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=dossierAdresse & nomDocument & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
.Visible = iVis
End With
Application.ScreenUpdating = True
End Sub