Hobbyist Posted January 23, 2018 Share Posted January 23, 2018 I had viewed other posts on Shell Execute and looked at the help file. Here is my question (here is what I have used): ShellExecute ( "Food.pdf" , "" ,"C:\My Files",$SHEX_PRINT ) I am misunderstand something on this. Is this to take the document straight to the printer with no intervention or user input? When using the above, the document opens on the screen where from there I could click the regular print request if I wanted to, but I was looking to avoid that part. I actually have the above in a print button on my control. It appears the above executes the same as ShellExecute ( "C:\My Files\Food.pdf " ). I never knew about the $SHEX_PRINT. Hobbyist Link to comment Share on other sites More sharing options...
computergroove Posted January 25, 2018 Share Posted January 25, 2018 Try this: ShellExecute ( "Food.pdf" , "" ,"C:\My Files\","print" ) You may need to elevate to admin depending on what version of Windows you are running. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Hobbyist Posted January 25, 2018 Author Share Posted January 25, 2018 Thanks for taking time to read my post and comment. I had also previously tried what you suggested before I came to the forum with my question. I was hoping to be able to get a file to print without having to open it and then print. I think that would be a time saver for me. If you think of anything else let me know. This has got me perplexed or I just don't understand the command in question. Hobbyist Link to comment Share on other sites More sharing options...
xcaliber13 Posted January 26, 2018 Share Posted January 26, 2018 Hobbyist, This is what I use to print pdf files without having to open them. Prints directly to the default printer. Download and install SumatraPDF. It is free software. Then create this batch file @echo off SET printing=c:\Temp SET Sumatra=C:\Program Files\SumatraPDF\SumatraPDF.exe FOR %%F IN (%printing%\*.*) DO "%Sumatra%" -print-to-default "%%~fF" exit This will print all the pdf files within the SET printing folder without having to open them. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now