Fermer un fichier PDF
Résolu
Utilisateur anonyme
-
Utilisateur anonyme -
Utilisateur anonyme -
A voir également:
- Impossible de fermer adobe reader
- Télécharger adobe reader 9.1 français gratuit - Télécharger - PDF
- Adobe acrobat - Guide
- Adobe flash player - Télécharger - Divers Web & Internet
- Adobe air - Télécharger - Édition & Programmation
- Telecharger foxit reader - Télécharger - PDF
3 réponses
Bonjour,
J'y vais de ma contribution, en utilisant l'api user32 :
J'y vais de ma contribution, en utilisant l'api user32 :
Private Declare Function FindWindow Lib "user32" _ Alias "FindWindowA" _ (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Private Declare Function PostMessage Lib "user32" _ Alias "PostMessageA" _ (ByVal hwnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ ByVal lParam As Long) As Long Declare Function GetWindowText Lib "user32" _ Alias "GetWindowTextA" _ (ByVal hwnd As Long, _ ByVal lpString As String, _ ByVal cch As Long) As Long Declare Function GetWindow Lib "user32" _ (ByVal hwnd As Long, _ ByVal wCmd As Long) As Long Sub Boucle_Sur_Fenetres() Dim pointeur As Long Dim titre As String pointeur = FindWindow(vbNullString, "") Do While pointeur <> 0 titre = String(100, Chr$(0)) GetWindowText pointeur, titre, 100 titre = Left$(titre, InStr(titre, Chr$(0)) - 1) If titre Like "*" & Nom & ".pdf" & "*" Then FermerFenetre pointeur: Exit Sub pointeur = GetWindow(pointeur, 2) Loop End Sub Sub FermerFenetre(handWindow As Long) PostMessage handWindow, 16, 0, 0 End Sub
Utilisateur anonyme
Bonjour, merci pour ta réponse mais j'ai une erreur...il me dit qu'il manque des end sub pourtant quand je les rajoute j'ai toujours l'erreur...
pijaku
Messages postés
12263
Date d'inscription
Statut
Modérateur
Dernière intervention
2 761
>
Utilisateur anonyme
Peux tu nous copier coller ton code intégralement?