Link to home
Start Free TrialLog in
Avatar of sbala43
sbala43

asked on

Print the word document in visual basic

I have to print the word document thru vb application. The document contains two pages and the print out must come in one sheet(ie the pages must be back to back). Is there any way to achive it? I tried the following.

1. Printer.Duplex = 2
   loword.PrintOut
2. loword.ActiveDocument.PageSetup.TwoPagesOnOne = True
   loword.ActiveDocument.PrintOut
It is not working.

here loWord is Word application object.
Can anyone help me?
Avatar of sbala43
sbala43

ASKER

Is there anyway I can print two pages on one page in Word through VB/API ?

I don't think that you are thinking in the right direction. VB and WORD don't print two pages on one piece of paper. It's the printer that does it. I only know of very costly printers that will print on one side and then reverse the paper and print on the other side. Of course you can print a page on one side of the paper, then turn the paper over put it back into the printer and print on the other side.
I think that if you had a postscript printer and you knew postscript, you could do it.
As vbDoc said, you cannot do that


However, you can print 2 page on ONE size


ie.

loword.Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
        Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=2, _
        PrintZoomRow:=1, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
Avatar of DanRollins
Hi sbala43,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.

sbala43, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial