Solved

Printing multiple fonts

Posted on 1998-10-01
3
183 Views
Last Modified: 2013-12-03
I have to print multiple fonts within 1 report on 1 page.
I can change the fontsize etc only once.
When i try to change if for the second ord third time, the first selected font remains active until i give a .enddoc.

What am i doing wrong?

I am using:
printer.font.size = 10
printer.font.bold = true
printer.print "Example"
printer.font.size = 12
printer.font.bold = false
printer.print "Example 2"



0
Comment
Question by:amannien
3 Comments
 
LVL 2

Accepted Solution

by:
dabellei earned 100 total points
ID: 1437689
I've try your code and it's Ok on my computer.  Anyway check your font your using.  Try to put the line printer.fontbold=false before changin the size of the font.

I've change the font three time on the same page before doing a enddoc, try your program on another computer to verify.

0
 
LVL 12

Expert Comment

by:mark2150
ID: 1437690
I seem to remember a note that said that you had to sometimes send the font change twice for it to take effect. This was a workaround. Multiple font printing does work. you have to be sure that the font you're selecting actually has the variant you're calling for. Not all fonts have all permutations of roman/bold/italic/bold&italic available at all sizes. There is also a problem going below 8 points. But the 10 & 12 you're calling for should work just fine.

M
0
 

Author Comment

by:amannien
ID: 1437691
Thanks,

You guy's put me in the right direction.
I am using an hp3p and when i turn off the bold printing before chaching the font time, it all works fine.

Super!
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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

895 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

11 Experts available now in Live!

Get 1:1 Help Now