Thanks for the help. That works great! Would I be able to somehow save that
response to use later in the macro? I want to replace the current directions
to print, namely the page range, to this "omit last page" range.
Here's the macro that I'm trying to apply it to:
Sub FormPrint()
Dim NumCopies As String
Dim StartNum As String
Dim Counter As Long
Dim oRng As Range
If MsgBox("The copy number will appear at the insertion point." _
& " Is the cursor at the correct position?", _
vbYesNo, "Placement") = vbNo Then End
If ActiveDocument.Saved = False Then
If MsgBox("Do you want to save any changes before" & _
" printing?", vbYesNoCancel, "Save document?") _
= vbYes Then
ActiveDocument.Save
End If
End If
StartNum = Val(InputBox("Enter the starting number.", _
"Starting Number", 6))
NumCopies = Val(InputBox("Enter the number of copies that" & _
" you want to print", "Copies", 1))
ActiveDocument.Bookmarks.Add Name:="CopyNum", Range:=Selection.Range
Set oRng = ActiveDocument.Bookmarks("CopyNum").Range
Counter = 0
If MsgBox("Are you sure that you want to print " _
& NumCopies & " numbered " & " copies of this document", _
vbYesNoCancel, "On your mark, get set ...?") = vbYes Then
While Counter < NumCopies
oRng.Delete
oRng.Text = StartNum
Dim sCurrentPrinter As String
Dim sFormPrint As String
sCurrentPrinter = Application.ActivePrinter
Application.ActivePrinter = "\\apd-print2\05025_82_9k on NE01:"
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="1-3", PageType:= _
wdPrintAllPages, ManualDuplexPrint:=False, Collate:=False,
Background:= _
True, PrintToFile:=False, PrintZoomColumn:=0, PrintZoomRow:=0, _
PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
Application.ActivePrinter = sCurrentPrinter
StartNum = StartNum + 1
Counter = Counter + 1
Wend
End If
End Sub