Simplex/Duplex Printing

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

Guest

All of our printers are set to print duplex, however, there are times when
users need to print simplex and I am trying to set up a macro which changes
from duplex to simplex.

I have used the code in the following link
http://support.microsoft.com/?kbid=230743

As we are using Word 2000, I have changed "Printer.DeviceName" to
"ActivePrinter" and have reversed the duplex settings (ie. where it is 2 have
changed to 1 and vice versa).

The macro works perfectly if I use the code for UserForm1 from the link (ie.
creating a new Word Object and Document Object), however, I want to be able
to have the macro work on the open document (ActiveDocument) without having
to create a new word object/document object.

If I use:
"SetPrinterDuplex ActivePrinter, 1
ActiveDocument.PrintOut
SetPrinterDuplex Activeprinter, 2"
It still prints on duplex.

Is there any reason why you have a create a new word object/document object
to have this work properly?

Hopefully, this will make sense to someone and you will be able to answer my
questions.
 
How are you using the code

SetPrinterDuplex ActivePrinter, 1
ActiveDocument.PrintOut
SetPrinterDuplex Activeprinter, 2


--
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
 
Where the code from the link (for UserForm1) has:
"Dim oWord As Object
Dim oDoc As Object
Set oWord = CreateObject("Word.application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add
oDoc.Range.Select
oWord.Selection.TypeText "This is on page 1" & vbCr
oWord.Selection.InsertBreak 1
oWord.Selection.TypeText "This is page 2"
SetPrinterDuplex Printer.DeviceName, 2
oDoc.PrintOut Background:=False
SetPrinterDuplex Printer.DeviceName, 1"

I have replaced it with
"SetPrinterDuplex ActivePrinter, 1
ActiveDocument.Printout
SetPrinterDuplex ActivePrinter, 2"

So instead of creating a new document I am just printing the active document
in Word.

thanks,
 

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