This is a Windows issue. One way to overcome the problem is to beat it with
a blunt instrument. The following macro allows you to select a list of
files. The filenames are then loaded into a Word document and sorted into
alphabetical order. (To print in a preferred random order is somewhat more
complicated and you would have to use a method like that employed in my
boiler add-in to assemble the files in order before processing them - in
fact I might create an add-in to do just that
if I have a few minutes
spare)
The files listed in the document are then opened in the order they are now
presented, printed and closed.
Sub BatchPrint()
Dim strPath As String
Dim oDoc As Document, oPrDoc As Document
Dim oRng As Range
Dim i As Long, iNum As Long
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
.title = "Select files to print and click OK"
.AllowMultiSelect = True
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User", , _
"Print Files"
Exit Sub
End If
End With
Set oDoc = Documents.Add
iNum = fDialog.SelectedItems.Count
For i = 1 To iNum
strPath = fDialog.SelectedItems.Item(i)
oDoc.Range.InsertAfter strPath
If i < fDialog.SelectedItems.Count Then
oDoc.Range.InsertAfter vbCr
End If
Next i
oDoc.Range.Sort
For i = 1 To iNum
Set oRng = oDoc.Paragraphs(i).Range
oRng.End = oRng.End - 1
MsgBox oRng.Text
WordBasic.DisableAutoMacros 1
Set oPrDoc = Documents.Open(oRng.Text)
oPrDoc.PrintOut
oPrDoc.Close wdDoNotSaveChanges
WordBasic.DisableAutoMacros 0
Next i
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>