Solved

Printing an image and text

Posted on 2002-04-18
5
158 Views
Last Modified: 2010-05-02
Hello,


I am printing an image in the upper left hand corner of a page.  I am using Printer.PaintPicture to accomplish this.  The image is about 1"X 1".  My problem is that I also need to print text to the right of the image on the uppermost part of the page.

With Printer.PaintPicture the printer moves down about 1".  How would I, or can I, go about printing back up the page?

Thanks.

Mike
             
             
0
Comment
Question by:MichaelVB
5 Comments
 
LVL 3

Expert Comment

by:leojl
ID: 6952763
hi,

I was going to say that you can dictate the x,y coordinates to print, but then I looked again at the question...

You should not try to print a picture and then try to back up for printing... You must get both picture and text all togather before you send it to the printer.

leo
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 100 total points
ID: 6954040
I don't see why you can't set the coordinates:

Printer.CurrentX = Printer.ScaleX(Image1.Picture.width, vbHiMetric, vbPixels)
Printer.CurrentY = 0

The "line movement" occurs within the spooler buffer, so it should cause no problems.  When the buffer is ready to print, just Printer.EndDoc.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6954398
You might be able to leave the Printer.CurrentX alone, as I think that it might have moved to the right of the image after printing.  But then, as rspahitz suggests, set the CurrentY back to zero will take you back to the top of the page.
0
 

Author Comment

by:MichaelVB
ID: 6957170
Thanks for the input guys.  I actually need to print this image in each corner of the page.  I am printing a type of certificate with some artwork/designs for asthetics in each corner.  As of yet, I have not had time to give  these suggestions a try.  Given this extra information, do they still apply.

Thanks again,

Mike

0
 
LVL 18

Expert Comment

by:mdougan
ID: 6957265
Well, if you're printing to the printer object, you will likely be controling when you move to a new page.  So, at the start of each new page, you just print your image and text, then position the CurrentX and CurrentY down the page to continue with your printing.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now