programmationniste
Messages postés49Date d'inscriptionmardi 1 février 2005StatutMembreDernière intervention16 mai 2009
-
10 févr. 2005 à 13:10
cs_ITALIA
Messages postés2169Date d'inscriptionvendredi 20 avril 2001StatutMembreDernière intervention30 juin 2009
-
10 févr. 2005 à 13:44
salut je suis un débutant quelqu'un peut me dire comment utiliser
ce code (trouvé sur codes sources) pour imprimer un fichier
' APIs + Const
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
cs_DARKSIDIOUS
Messages postés15814Date d'inscriptionjeudi 8 août 2002StatutMembreDernière intervention 4 mars 2013130 10 févr. 2005 à 13:41
Voir mon message pour ton problème d'impression, ce sera plus simple
que de passer par cette fonction API qui en plus nécessite
d'enregistrer ton texte dans un fichier !
DarK Sidious
Administrateur et reponsable VB/API du site www.ProgOtoP.com
econs
Messages postés4030Date d'inscriptionmardi 13 mai 2003StatutMembreDernière intervention23 décembre 200824 10 févr. 2005 à 13:44
Tu mets un bouton nommé Command1 sur ta feuille, puis tu recopies ceci
dans le code de ta feuille. (N'oublie pas de changer le nom du fichier
à imprimer).
' APIs + Const
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
Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
Dim Filename As String
' Fonction
' Filename$ est le nom du fichier
Filename = "C:\mon_fichier.extension" ' <== à modifier
cs_ITALIA
Messages postés2169Date d'inscriptionvendredi 20 avril 2001StatutMembreDernière intervention30 juin 20099 10 févr. 2005 à 13:44
'Cette Partie est à mettre par exemple en haut d' un module
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
Const SW_SHOWNORMAL = 1