Can I print only the first page of a group of documents?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to "group pirnt" page 1 from a list of documents? This is for
a non-electronic approval (hard or "wet" signature required.)
 
The following macro will let you browse to the folder that contains the
files and then print out the first page of each file in the folder:

Sub PrintFirstPageOfFilesInAFolder()

Dim MyPath As String
Dim MyName As String
Dim DoctoPrint As Document

'let user select a path
With Dialogs(wdDialogCopyFile)
If .Display() <> -1 Then Exit Sub
MyPath = .Directory
End With

'strip quotation marks from path

If Len(MyPath) = 0 Then Exit Sub

If Asc(MyPath) = 34 Then
MyPath = Mid$(MyPath, 2, Len(MyPath) - 2)
End If

'get files from the selected path
'and insert them into the doc
MyName = Dir$(MyPath & "*.*")
Do While MyName <> ""
Set DoctoPrint = Documents.Open(MyName)
DoctoPrint.PrintOut Background:=False, Range:=wdPrintFromTo, From:="1",
To:="1"
DoctoPrint.Close wdDoNotSaveChanges
MyName = Dir
Loop

End Sub

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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

Back
Top