Print and sort multiple documents.

P

PJ

I am wanting to print multiple documents, so when they print they are sorted
(ie print 1st doc next to 2nd doc, next to 3rd doc, then start over again).
There will be several of each of these sorted documents.
Some of the documents require staples, and some do not.

At the moment this is done manually and is very time consuming.
It prints to a photocopier which can handle the volume

Any help apprecited
-PJ
 
G

Graham Mayor

You can, by using a macro, print the documents in any order you wish, but
the macro would have to know how to sort the documents into the order you
require, and your question doesn't explain what that is. The macro would
also need to know how to determine which of your documents require stapling
and which don't - again your question doesn't explain that. To get you
started, the following macro will print all the documents from a folder
selected in the macro in alphabetical order:

Sub BatchPrint()
Dim strFileName As String
Dim strPath As String
Dim oDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)

With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User", , _
"List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) <> "\" _
Then strPath = strPath + "\"
End With

If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
If Left(strPath, 1) = Chr(34) Then
strPath = Mid(strPath, 2, Len(strPath) - 2)
End If
strFileName = Dir$(strPath & "*.doc")

While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)
'Do what you want with oDoc
oDoc.PrintOut
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top