I am new to coding with VBA. This is my unfinished code to print documents in a folder containing documents with 3 distinct headers, \"DN\" \"INV\" and \"PO\". I\'ve been se
The VBA code from Kajkrow works well. I needed to print to specific printer, so, if someone is looking at this, I found a solution that worked for me, simple use "printto" instead of "print" as the verb of SheelExecute, and provide the name of the specific printer name in the fourth parameter just after the filename.
Call apiShellExecute(Application.hwnd, "printto", strPathAndFilename, "my printer name", vbNullString, 0)