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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,215,438
Messages
6,124,873
Members
449,192
Latest member
MoonDancer

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