?
Solved

Printing an image and text

Posted on 2002-04-18
5
Medium Priority
?
164 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
[X]
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
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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 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