Correct Print Duplex Macro

samsnee

Board Regular
Joined
Dec 16, 2005
Messages
73
Hello,

I am trying to create a macro for duplex (double-sided) printing. I've tried following the instructions from this site:

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

But it's still printing one-sided only. My code looks like this:

Sub printNorthBW()
Dim iDuplex As Long
iDuplex = GetDuplex

SetDuplex 2

Application.ActivePrinter = "\\NYHQPS03\NorthBW on Ne03:"
If Not ActiveSheet.Range("C7").Value < 1 Then
ActiveSheet.PrintOut Copies:=ActiveSheet.Range("C7").Value, Collate:=True

End If

SetDuplex iDuplex
End Sub

The activesheet.range is just a cell where people can key in how many copies they want to print.

Any ideas what I need to fix? Thanks.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,215,660
Messages
6,126,085
Members
449,287
Latest member
lulu840

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top