Depuis VB6, SP5, je souhaite imprimer un document Word=20
dont je connais le chemin complet.
Est-il possible d'imprimer son contenu sans ouvrir=20
l'application Word ?
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
Tu peux remplacer SW_SHOWNORMAL par SW_HIDE ppour le masquer entièrement.
-- François Picalausa (MVP VB) http://faq.vb.free.fr --- http://msdn.microsoft.com http://apisvb.europe.webmatrixhosting.net
"xyzDaniel" a écrit dans le message de news:87aa01c4329f$05099740$
Bonjour à tous,
Depuis VB6, SP5, je souhaite imprimer un document Word dont je connais le chemin complet. Est-il possible d'imprimer son contenu sans ouvrir l'application Word ?
merci beaucoup. Daniel
Hello!
Il est possible de faire l'équivalent d'un click droit sur le fichier >
imprimer par shell execute avec le verb print:
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
Tu peux remplacer SW_SHOWNORMAL par SW_HIDE ppour le masquer entièrement.
--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net
"xyzDaniel" <anonymous@discussions.microsoft.com> a écrit dans le
message de news:87aa01c4329f$05099740$a401280a@phx.gbl
Bonjour à tous,
Depuis VB6, SP5, je souhaite imprimer un document Word
dont je connais le chemin complet.
Est-il possible d'imprimer son contenu sans ouvrir
l'application Word ?
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
Tu peux remplacer SW_SHOWNORMAL par SW_HIDE ppour le masquer entièrement.
-- François Picalausa (MVP VB) http://faq.vb.free.fr --- http://msdn.microsoft.com http://apisvb.europe.webmatrixhosting.net
"xyzDaniel" a écrit dans le message de news:87aa01c4329f$05099740$
Bonjour à tous,
Depuis VB6, SP5, je souhaite imprimer un document Word dont je connais le chemin complet. Est-il possible d'imprimer son contenu sans ouvrir l'application Word ?
merci beaucoup. Daniel
xyzDaniel
François, Merci beaucoup, je la teste. Mais je suis sûr du résultat. à tantôt. Daniel
-----Message d'origine----- Hello!
Il est possible de faire l'équivalent d'un click droit
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
ShellExecute Me.hwnd, "print", "C:File.doc",
vbNullString, "C:",
SW_SHOWNORMAL
Tu peux remplacer SW_SHOWNORMAL par SW_HIDE ppour le
masquer entièrement.
-- François Picalausa (MVP VB) http://faq.vb.free.fr --- http://msdn.microsoft.com http://apisvb.europe.webmatrixhosting.net
"xyzDaniel" a écrit
dans le
message de news:87aa01c4329f$05099740$
Bonjour à tous,
Depuis VB6, SP5, je souhaite imprimer un document Word dont je connais le chemin complet. Est-il possible d'imprimer son contenu sans ouvrir l'application Word ?
merci beaucoup. Daniel
.
François,
Merci beaucoup, je la teste. Mais je suis sûr du résultat.
à tantôt.
Daniel
-----Message d'origine-----
Hello!
Il est possible de faire l'équivalent d'un click droit
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
ShellExecute Me.hwnd, "print", "C:File.doc",
vbNullString, "C:",
SW_SHOWNORMAL
Tu peux remplacer SW_SHOWNORMAL par SW_HIDE ppour le
masquer entièrement.
--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net
"xyzDaniel" <anonymous@discussions.microsoft.com> a écrit
dans le
message de news:87aa01c4329f$05099740$a401280a@phx.gbl
Bonjour à tous,
Depuis VB6, SP5, je souhaite imprimer un document Word
dont je connais le chemin complet.
Est-il possible d'imprimer son contenu sans ouvrir
l'application Word ?
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
ShellExecute Me.hwnd, "print", "C:File.doc",
vbNullString, "C:",
SW_SHOWNORMAL
Tu peux remplacer SW_SHOWNORMAL par SW_HIDE ppour le
masquer entièrement.
-- François Picalausa (MVP VB) http://faq.vb.free.fr --- http://msdn.microsoft.com http://apisvb.europe.webmatrixhosting.net
"xyzDaniel" a écrit
dans le
message de news:87aa01c4329f$05099740$
Bonjour à tous,
Depuis VB6, SP5, je souhaite imprimer un document Word dont je connais le chemin complet. Est-il possible d'imprimer son contenu sans ouvrir l'application Word ?