Link to home
Start Free TrialLog in
Avatar of MissHappy
MissHappy

asked on

Batch print folders

I have a number of folders with word documents in them.
I would like to print them all, but can't figure out how to do it.

I have tried this:
http://www.ehow.com/how_7535595_print-contents-multiple-folders.html
The shell:to option is not showing when I am testing in on 2 folders with two documents.
Also it is not possible to drag the folders to the printer.
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

You could do that with a Word macro
Sub PrintDocsInFolder()
    Dim strFileName As String
    Dim doc As Word.Document
    Dim strFolder As String
    
    strFolder = "C:\Folder1"
    
    strFileName = Dir$(strFolder & "\*.doc*")
    Do Until strFileName = ""
        Set doc = Documents.Open(strFolder & "\" & strFileName)
        doc.PrintOut
        doc.Close False
        strFileName = Dir$()
    Loop
   
End Sub

Open in new window

Try use command-line

for /f "tokens=*" %a in ("dir /b PATH\*.doc") do "C:\Program Files\Microsoft Office\Office\winword.exe" "PATH\%a" /mFilePrintDefault

or

for /f "tokens=*" %a in ("dir /b PATH\*.docx") do "C:\Program Files\Microsoft Office\Office\winword.exe" "PATH\%a" /mFilePrintDefault
Avatar of MissHappy
MissHappy

ASKER

Do you mean like this?

for /f "tokens=*" %a in ("dir /b P:\test\*.docx") do "C:\Program Files\Microsoft Office\Office\winword.exe" "PATH\%a" /mFilePrintDefault

How can this type of command handle multiple folders such as test/test1/doc.docx, test/test2/doc2.docx
I don't think any of these methods will work because this is intended for users where I work to be able to print zip-files they download with multiple folders and files easily.

It will be to complicated for them to start writing commands that have to be edited each time they download a folder or editing a macro because the path to the folder changes. each time.

Are there no simple ways to accomplish this?
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
May be simple install 3d party software? For example http://www.awises.com/