This is what I found on my search ... you seemed to have made some
changes that only allow the first page to be printed.
Sub PrintBothSides()
Dim iTemp As Integer
ActiveDocument.PrintOut Copies:=1, PageType:=wdPrintOddPagesOnly
iTemp = MsgBox("Switch paper to continue", vbOKCancel,
"PrintBothSides")
If iTemp = vbOK Then
ActiveDocument.PrintOut Copies:=1,
PageType:=wdPrintEvenPagesOnly
End If
End Sub
Hi Dave,
You're right, I did change the code to print the first page only....at
first. Once the message box appears, and the user chooses "Ok", then the even
pages are printed. I only want the first and second page printed, with a
break in between to allow for time to flip the page.
I will add that the code works fine when I debug, but at runtime, it sends
the document (page 1) to the printer queue and spools. Then after I click ok,
it will send the second document (page 2) to the printer queue, and will
start printing the first document (Page 1), folowed immediately by page 2.
It's very strange, but I imagine it has something to do with the code.
Thanks for your help Dave.
~Eric
> This is what I found on my search ... you seemed to have made some
> changes that only allow the first page to be printed.
[quoted text clipped - 10 lines]
> End If
> End Sub
dave.cuthill@computalog.com - 17 Aug 2005 22:12 GMT
I took out the manualduplexprint and it now seems to do what you are
wanting. But I think you need to be on the first page of the document
when you run the macro.
ActiveDocument.PrintOut Copies:=1, Range:=wdPrintCurrentPage
I wonder whether you should use Range:=wdPrintFromTo, From:="1",
To:="1" to guarantee that the first page is printed regardless of where
you are at the time of running the macro.
Eric L. - 18 Aug 2005 20:05 GMT
I tried it exactly the way you suggested, and it still spools page one
instead of printing it. It'll only print AFTER you click OK. Very puzziing
problem.
> I took out the manualduplexprint and it now seems to do what you are
> wanting. But I think you need to be on the first page of the document
[quoted text clipped - 5 lines]
> To:="1" to guarantee that the first page is printed regardless of where
> you are at the time of running the macro.
dave.cuthill@computalog.com - 18 Aug 2005 20:39 GMT
Works fine for me - maybe it's related to your printer. Why not try
another printer or mess around for the printer setup.
David
Eric L. - 18 Aug 2005 20:43 GMT
Dave,
Thanks for all your help! This code ended up working:
Sub PrintBothSides()
'
' PrintBothSides Macro
' Allows manual duplex printing
' Prints page 1, tells user to flip the page over, and then prints page 2
ActiveDocument.PrintOut ManualDuplexPrint:=True, Range:=wdPrintFromTo,
From:="1", To:="2"
End Sub
> I took out the manualduplexprint and it now seems to do what you are
> wanting. But I think you need to be on the first page of the document
[quoted text clipped - 5 lines]
> To:="1" to guarantee that the first page is printed regardless of where
> you are at the time of running the macro.