Solved

Print the word document in visual basic

Posted on 2002-06-05
6
248 Views
Last Modified: 2013-11-25
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?
0
Comment
Question by:sbala43
6 Comments
 

Author Comment

by:sbala43
ID: 7063478
Is there anyway I can print two pages on one page in Word through VB/API ?

0
 
LVL 2

Expert Comment

by:vbDoc
ID: 7070529
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.
0
 
LVL 4

Expert Comment

by:eeyore7250
ID: 7266153
I think that if you had a postscript printer and you knew postscript, you could do it.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 26

Expert Comment

by:EDDYKT
ID: 7266917
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
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7858093
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
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 8050629
Points refunded and placed in PAQ

Computer101
E-E Admin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question