I need to print out 20 individual Word documents. I don't want to open each up and click Print.
Can I somehow print all at once?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
I'm thinking that this is more than just a one time need (otherwise you can use the Windows UI to select multiple documents, right-click, and choose print).
Would a macro be acceptable? Here's the basic code needed to open and print a Word doc from a macro:
Sub PrintDocMacro() Dim objWord As Object Set objWord = CreateObject("Word.application") 'Start app objWord.Documents.Open FileName:="c:\Temp\test.docx" 'Open doc objWord.Visible = True objWord.Application.PrintOut 'Print doc objWord.ActiveDocument.Close savechanges:=True 'close & save doc objWord.Application.Quit 'Close app Set objWord = Nothing End Sub
We'd need to write a loop to print all of the docs you want. If the docs you want to print are all of the docs in a given folder, we could do that too. Microsoft has example code for reading a directory.
If you want to print these on a schedule for some reason, I suppose you could make the file containing the macro run it with AutoOpen and even close when done and just schedule that macro-enabled file to be opened via the Task Scheduler.
I realize that this is an old question, but I didn't see the answer I use here.
You can use the right click option from the Windows Explorer shell to print multiple documents. Normally this has a 15 document limit; however, that limit can be changed in the registry. Here is the value to modify to your needed limit:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer Name : MultipleInvokePromptMinimum Type : DWORD Default : 15 (decimal)
Hopefully that saves someone the trouble of using a macro.
This is a macro that lets you specify a folder and it will print all word files inside this folder including the subfolders.
Public optionCancel Sub Print_word_files() Dim path Dim reminder As Integer Dim oExtension As String Dim Fso, oFolder, oSubfolder, oFile, queue As Collection On Error Resume Next path = " " //######################put files path here (ex: c:\users\myFiles) ################ If optionCancel = "yes" Then optionCancel = "No" Exit Sub End If reminder = MsgBox("Are you sure you want to print these files?", 4, "WARNING !!") If reminder = 6 Then 'If Yes is clicked Set Fso = CreateObject("Scripting.FileSystemObject") Set queue = New Collection queue.Add Fso.GetFolder(path) 'The path Do While queue.Count > 0 Set oFolder = queue(1) queue.Remove 1 'dequeue '...insert any <<folder>> processing code here... For Each oSubfolder In oFolder.subfolders queue.Add oSubfolder 'enqueue Next oSubfolder For Each oFile In oFolder.Files oExtension = Right(oFile, Len(oFile) - InStrRev(oFile, ".", -1)) 'gets the file extension If oExtension = "docx" Or oExtension = "DOCX" Or oExtension = "doc" Or oExtension = "DOC" Or oExtension = "docm" Or oExtension = "DOCM" Or oExtension = "rtf" Or oExtension = "RTF" Then Documents.Open FileName:=(oFile) '-------------------The required starts here ActiveDocument.PrintOut 'Prints document ActiveDocument.Saved = True 'to prevent asking to save ActiveDocument.Close 'Closes document '-------------------The required ends here End If Next oFile Loop Else MsgBox ("Operation cancelled!!") End If End Sub
I print all documents (usually up to 30-32 documents) at once from a folder, by selecting all of them and then R-click and choose print. This sends to default printer with printer's current settings and current settings of each file. This was possible using Windows XP Professional, with MS Word 2003. Now we are switching to Windows 7 and I will need to figure out a new way and I did notice the file limit is 15 (if you select more than 15, "print all" is not available in R-click menu), which then you cannot just click on print and leave the computer to do something else, you have to wait until all printed and do it again. Also, the efficiency with which Windows XP and MSW 2003 opened a document and sent to print is way better than Windows 7 (but I was running 7 from a MAC Parallels Program).
I also noticed that if I open a blank Word window and re-size it to the bare minimimum rectangle on Desktop (this is not minimizing it to status bar) before I sent multiple files to Print, efficiency of Word with opening, sending and closing each file was increased.