Link to home
Start Free TrialLog in
Avatar of Goesta_Stoeckelmann
Goesta_Stoeckelmann

asked on

WinPrint command from command line?

How can i "emulate" the NT print command (right mouseclick on file -> Print) by command line? The command line command "print" is not useful due to missing application connections, eg. print .doc or .xls documents with right mouse click on file. Maybe a shell32.dll function call via rundll32? Please help...
Avatar of ONEILL
ONEILL

You will have to write a different print command, batch file for each application. You could call the one for .doc file Wordprt and so on.

It is possible to start an application and tell it to print the file by command line startup options perhaps of the form "Winword.exe /P filename". I am not 100% certain of all the options but a rummage in the File association in " Windows Explorer/ View/ Options/ File Type" menu for Microsoft word documents might yeild a few clues.
ASKER CERTIFIED SOLUTION
Avatar of Luitzen
Luitzen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Goesta_Stoeckelmann

ASKER

Good answer, but how can i pass the dde commands needed by e.g winword to print then?