• Print All Word Docs in Directory (Word 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Print All Word Docs in Directory (Word 2000)

    Author
    Topic
    #396018

    I have a directory, “c:printme”, where I place documents that I would like printed. Once a month I print them. Can anyone point me to a link, source on how I can make/purchase a macro/program/tool that will print out all the documents in this directory? I am most interested in Word documents, but I am hopeful that the solution can be easily extensible to other types of office documents – excel, powerpoint and perhaps .pdf’s and html files. [Woody had mentioned in a newsletter that he had a macro that printed the word documents in a directory over night, so that reports were ready the next morning, but did not include any implementation details.]

    Thanks!

    P.S. Did I miss the search button/box on the site? I’m sure this question has been asked before. FAQ did not have any info on peforming searches.

    Viewing 7 reply threads
    Author
    Replies
    • #739053

      The question about printing all Word documents has been asked before, and a macro was posted to open each document in the folder, print, and close it. Hopefully someone will have this handy. (The search feature had to be turned off to avoid getting kicked off our web host as bandwidth hogs.)

      It’s a bit more complicated if you have multiple file types to print: the Word macro either would have to automate all the other applications, or you’d have to adopt a different approach. As you’ve probably noticed, a lot of file types support a right-click Print option. However, I have read in earlier posts that if you select a large number of files at once, it doesn’t always work smoothly. I can’t recall whether anyone posted a solution that let’s you take advantage of Windows Explorer’s knowledge of how to print documents in a batch file or other automated routine.

    • #739054

      The question about printing all Word documents has been asked before, and a macro was posted to open each document in the folder, print, and close it. Hopefully someone will have this handy. (The search feature had to be turned off to avoid getting kicked off our web host as bandwidth hogs.)

      It’s a bit more complicated if you have multiple file types to print: the Word macro either would have to automate all the other applications, or you’d have to adopt a different approach. As you’ve probably noticed, a lot of file types support a right-click Print option. However, I have read in earlier posts that if you select a large number of files at once, it doesn’t always work smoothly. I can’t recall whether anyone posted a solution that let’s you take advantage of Windows Explorer’s knowledge of how to print documents in a batch file or other automated routine.

    • #739063

      One Windows solution would be to open the folder in Windows Explorer & then select & drag all the files over to printer shortcut that you have on the desktop. Also, you could select them, right click, & choose Print.
      Cheers,

    • #739064

      One Windows solution would be to open the folder in Windows Explorer & then select & drag all the files over to printer shortcut that you have on the desktop. Also, you could select them, right click, & choose Print.
      Cheers,

    • #739065

      Hi jdcswopr,

      For Word, you could use a macro like:

      Sub DirFilePrint()
      Set oFile = Application.FileSearch
      With oFile
      .LookIn = “c:printme”
      .FileName = “*.doc”
      If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then
      MsgBox “There were ” & .FoundFiles.Count & ” file(s) found.”
      For i = 1 To .FoundFiles.Count
      With Selection
      Documents.Open (oFile.FoundFiles(i))
      ActiveDocument.PrintOut
      ActiveDocument.Close
      End With
      Next i
      Else
      MsgBox “There were no files found.”
      End If
      End With
      End Sub

      Something similar would work with Excel, but you’d also need to consider what worksheet(s) you wanted to print, and add code to manage that. Similar issues might arise with other apps too.

      Cheers

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #739066

      Hi jdcswopr,

      For Word, you could use a macro like:

      Sub DirFilePrint()
      Set oFile = Application.FileSearch
      With oFile
      .LookIn = “c:printme”
      .FileName = “*.doc”
      If .Execute(SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending) > 0 Then
      MsgBox “There were ” & .FoundFiles.Count & ” file(s) found.”
      For i = 1 To .FoundFiles.Count
      With Selection
      Documents.Open (oFile.FoundFiles(i))
      ActiveDocument.PrintOut
      ActiveDocument.Close
      End With
      Next i
      Else
      MsgBox “There were no files found.”
      End If
      End With
      End Sub

      Something similar would work with Excel, but you’d also need to consider what worksheet(s) you wanted to print, and add code to manage that. Similar issues might arise with other apps too.

      Cheers

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #739074

      I’ve been using Windows for years, and I have never used the Right-Click –> print function before or the click and drag function to the printer icon. I guess that my “box” was too small, and I needed your help to think outside of it.

      I will use the macro to see if I can add something to the windows scheduler. Thank you for your responses.

      • #739351

        I use a freeware utility that puts a command on the right-click menu.

        PrintFolder 1.2

        http://no-nonsense-software.com/freeware%5B/url%5D

        Scroll to the bottom of the page for the free version

        Cheryl

        (Edited by HansV to make URL clickable – see Help 19)

        • #739447

          Hi Cheryl:
          I think that only prints a list of files in a given folder, not the files themselves. Still, it’s a useful addition. smile

          • #739506

            Oops! I’m asked so often about printing lists, that’s what I read. Sorry for confusing the issue.

            Cheryl

          • #739507

            Oops! I’m asked so often about printing lists, that’s what I read. Sorry for confusing the issue.

            Cheryl

        • #739448

          Hi Cheryl:
          I think that only prints a list of files in a given folder, not the files themselves. Still, it’s a useful addition. smile

      • #739352

        I use a freeware utility that puts a command on the right-click menu.

        PrintFolder 1.2

        http://no-nonsense-software.com/freeware%5B/url%5D

        Scroll to the bottom of the page for the free version

        Cheryl

        (Edited by HansV to make URL clickable – see Help 19)

    • #739075

      I’ve been using Windows for years, and I have never used the Right-Click –> print function before or the click and drag function to the printer icon. I guess that my “box” was too small, and I needed your help to think outside of it.

      I will use the macro to see if I can add something to the windows scheduler. Thank you for your responses.

    Viewing 7 reply threads
    Reply To: Print All Word Docs in Directory (Word 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: