#If VBA7 And Win64 Then
Private Declare PtrSafe Function GetDesktopWindow Lib "user32" () As Long
#Else
Private Declare Function GetDesktopWindow Lib "user32" () As Long
#End If
#If VBA7 And Win64 Then
Private Declare PtrSafe Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
#Else
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
#End If
Sub ImprimerPrésentation()
Dim DossierDestination As Variant, NomFichier As String
DossierDestination = ThisWorkbook.Path & "\Résultats Formulations"
NomFichier = DossierDestination & "\Formulation béton-" & [CahierDesCharges.Référence] & " - " _
& [CahierDesCharges.NomClient] & " - " & [CahierDesCharges.NomProjet] & ".pdf"
On Error Resume Next
MkDir (ThisWorkbook.Path & "\Résultats Formulations")
On Error GoTo 0
MsgBox "Vos résultats seront enregistrés sur le dossier " & DossierDestination, vbInformation + vbOKOnly, "Message d'information"
'PresentationResultats.ExportAsFixedFormat xlTypePDF, NomFichier, Quality:=xlQualityStandard, _
OpenAfterPublish:=True, IncludeDocProperties:=True, IgnorePrintAreas:=False
LockWindowUpdate GetDesktopWindow
PresentationResultats.PrintOut copies:=1, Preview:=False, ActivePrinter:="Microsoft Print To PDF", PrToFileName:=NomFichier, PrintToFile:=True
LockWindowUpdate False
Call DisableSpeedUp
End Sub