Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function ShellExecute Lib _
"shell32.dll" Alias "ShellExecuteA" ( _
ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
' impression pdf
Sub printpdf()
Dim nomfichier As String
Dim x As Long
x = FindWindow("XLMAIN", Application.Caption)
nomfichier = Range("F11")
'ShellExecute x, "open", nomfichier, "", "", 1
ShellExecute x, "print", nomfichier, "", "", 1
End Sub