Solved

Print center

Posted on 2001-06-09
2
208 Views
Last Modified: 2010-05-02
How do I print ...in the center of the page?
0
Comment
Question by:Object_shun
2 Comments
 
LVL 13

Accepted Solution

by:
samic400 earned 20 total points
Comment Utility
To printer in the middle of a line, you'll need to figure out the width of the text you're about to print, then begin printing 1/2 that difference between that width and the width of the printer object. This involves the use of the method textwidth, which gives the length (in the current scalemode) of a text string.

printer.currentx = (printer.width - printer.textwidth("print string")) / 2 printer.print "print string"

0
 

Expert Comment

by:sjulian
Comment Utility
When I use this technique, it prints off center to the right.  Whenever I use textwidth I do not get the expected results.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

762 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

7 Experts available now in Live!

Get 1:1 Help Now