Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Set Printform size to A4

Posted on 2004-09-07
5
1,024 Views
Last Modified: 2013-12-25
Hi all,

This is my case:
I would like to print a vb form in A4 size. And I tried to do in these way:

1, Set the form size to A4 size, but failed. Cos it limited the size to my monitor's size (like 1024*768).
  e.g. form.Height = 15000
        form.Width = 12000

2, Set the Printer.Zoom, but not all the printer driver support "Zoom" function
  e.g. Printer.Zoom = 145

Is there any method to print the vb form fit to page (A4)?
Printform seems doesn't provide this function

please help!!

Ashley


0
Comment
Question by:ashleyyeung
5 Comments
 
LVL 23

Expert Comment

by:Ioannis Paraskevopoulos
ID: 11995574
Use the printer object .There is a property called PaperSize and you can set it to

Printer1.PaperSize=vbPRPSA4

or

Printer1.PaperSize=vbPRPSA4Small
0
 

Author Comment

by:ashleyyeung
ID: 12012513
Thanks jyparask,

I tried this property before, but the scale of myForm doesn't fit to A4. This property only can help to set the printer's setting.
What I want is the form I created can fit to A4 during print.

Finally, I gave up using form for printing. and replaced by data report. another question comes out.
I can't set 2 pages (with different format) in the same data report.

I have 2 different pages, data come from same datasource. the printing order should be
P.1 - P.2 - P.1 - P.2 - ..................P.2
can I add something like page break in data report?

Thanks
Ashley
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12988996
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 62
Visual Studio search word table and return Cell index 8 68
VB 6 error 5 in windows 10 but not in XP 7 63
Problem to line 23 53
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

840 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