0

Can anyone help me out with duplex in vb.net for word document?

Dim odoc as word.document

odoc=Globals.ThisAddIn.Application.ActiveDocument

odoc.printout()

How to duplex it?

Kara
  • 6,115
  • 16
  • 50
  • 57
I kiet
  • 176
  • 2
  • 12
  • I had the same problem and here's my solution easily adaptable to Word: http://stackoverflow.com/a/33239717/2559297 – D_Bester Oct 20 '15 at 14:49

1 Answers1

0

That's a printer property, not a document or word property. See here: PrinterSettings.Duplex Property.

Alexander
  • 2,457
  • 1
  • 14
  • 17
  • Thanks For Reply. can you please give me some guid on with it? as i have also tried to use the property called can duplex with print document but its dosn't work for me.. :( – I kiet Jun 24 '13 at 16:11
  • Are you sure you selected the right printer to set the properties? What does CanDuplex return? Is your printer acutally able to print duplex? Do you get any error messages? Does it print at all? – Alexander Jun 25 '13 at 05:22
  • yup Can Duplex returns TRUE. means my printer can duplex but when i print its print as normal not as duplex, from my understanding its because i print the word doc.. here is the example code dim pd as new printdocument dim odoc as word.document=globls.thisaddins.application.active document if pd.printersetting can.duplex=true then odoc.printout() end if thnx – I kiet Jun 25 '13 at 08:20
  • You only ask the printer if it CAN duplex. You don't tell the printer to do so. – Alexander Jun 25 '13 at 09:24
  • IF the printer "CanDuplex", you set its Duplex property to the value you want it to use. Horizontal for example. – Alexander Jul 03 '13 at 15:44