![]() It works: Declare Function apiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _ Public Sub PrintFile(ByVal strPathAndFilename As String)Ĭall apiShellExecute(Application.hwnd, "print", strPathAndFilename, vbNullString, vbNullString, 0)īut this only let's you print on your default printer. '' To set the items in the current folder as "files"ĭeclare Function apiShellExecute 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 ![]() Set shFolder = shApp.NameSpace( currentPath ) Set shApp = CreateObject("shell.application")ĬurrentPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".") "DN" needs to printed out once, " INV" needs to be printed out 6 times, "PO" needs to be printed out 2 times. Can someone please teach me how to print it out? Thank you very much :) I tried using the invokeverb "&print" function but it doesn't seem to work. I've been searching around for the code/method to print out PDF documents. This is my unfinished code to print documents in a folder containing documents with 3 distinct headers, "DN" "INV" and "PO".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |