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?
231k 71 71 gold badges 622 622 silver badges 603 603 bronze badges asked Jan 3, 2013 at 17:50 engineerchuan engineerchuan 217 1 1 gold badge 2 2 silver badges 4 4 bronze badges Does it have to be a Linux solution? Commented Jan 3, 2013 at 17:52I rephrased your question to ask about your real problem. Why would you need to concatenate them if there was a simple solution to print all? Just ask about what you need to do and not about your attempted solution. That will give you better answers. See: What is the XY problem?
Commented Jan 3, 2013 at 18:04@slhck Just a friendly note - you've removed all reference to Linux in your edit; was this intentional?
Commented Jan 3, 2013 at 18:07@GrahamWager Not intentional, you're right. I accidentally removed it while editing the title. Since the user (based on their previous questions) also has OS X and Windows, we could leave that part open for clarification.
Commented Jan 3, 2013 at 18:10Nice use of my user history :). Yes, I do have Windows (at home). I guess a bonus would be the same thing in Linux. Haha.
Commented Jan 3, 2013 at 19:43In windows you can select multiple files right click and choose print and it will print all that you selected
however it with my testing it only works with up to 15 documents at a time (I guess it is to prevent an accidental catastrophe by printing the wrong folder.)
answered Jan 3, 2013 at 18:13 Scott Chamberlain Scott Chamberlain 31k 7 7 gold badges 97 97 silver badges 109 109 bronze badges That arbitrary and stupid 15 file limit exists for the Details pane as well in Windows 7's Explorer. Commented Jan 3, 2013 at 18:58@Karan There is a limit? I didnt know that. Well, I can see someone printing out 1000 documents at once by accident.
Commented Feb 24, 2014 at 17:31 You can remove the limit. See here: support.microsoft.com/kb/2022295 Commented May 7, 2014 at 18:52 @ComFreek: You you can, but not for the Details pane unfortunately. :( Commented Jun 11, 2014 at 21:44I'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.
answered Jan 3, 2013 at 18:55 1,907 14 14 silver badges 20 20 bronze badgesI 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.
answered Mar 20, 2018 at 15:39 123 5 5 bronze badgesWhat about putting together some shell commands and submitting each file to the printer individually?
lpr *.doc
Combining Microsoft *.doc files is not really possible in the way you want to do it. This is due to all the document header information at the top of each file.
31k 7 7 gold badges 97 97 silver badges 109 109 bronze badges answered Jan 3, 2013 at 17:55 4,479 9 9 gold badges 29 29 silver badges 36 36 bronze badgesThis 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 > 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