Information générale
Catégorie:
Fonctions Windows API
Also this may meet your needs:
oShell = CreateObject("WScript.Shell")
FileName=...
oShell.Run(FileName)
WAIT WINDOW TIMEOUT 2.0 && wait for document appearance
oShell.SendKeys("%FP")
WAIT WINDOW TIMEOUT 1.0 && wait for Print dialog
oShell.SendKeys("{TAB 2}{ENTER}")
WAIT WINDOW TIMEOUT 1.0 &&wait for Print Dialog closing
oShell.SendKeys("%FC") &&close InternetExplorer
oShell=.null.
>Hello Yuri,
>
>Still brings up dialog using your example
>
>Bob
>
>>Try this:
>>*PrinterName = getprinter()
>>?ShellExecute(0, 'printto', FileName, '"'+PrinterName+'"', 0, 1)
>>
>>>Hello All,
>>>
>>>I use ShellExecute to print a HTML file using the following syntax
>>>
>>>=Shellexecute(0,"Print",cFileName,"","",1)
>>>
>>>Can anyone tell me how to suppress the printer dialog box and just send it to the default printer??
>>>
>>>Thanks in advance
>>>
>>>Bob
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement