Simple (?!) printing problem 
Author Message
 Simple (?!) printing problem

I've got a form with a commondialog control and a button called "Print"
which invokes the following test code. However, one line does not print
at all, I only get 25 or so lines to the page in 10 point,  the wrong
paper bin is seleted (it takes the top one, not the lower), and the font
is incorrect.

So, what am I doing wrong. It's so simple but I'm going nuts ... and
running out of paper!!!

Help please, someone!

Private Sub Print_Click()
    With CommonDialog1
        .ShowPrinter
        Printer.Copies = .Copies
        Printer.Orientation = .Orientation            ' set to 1
        Printer.PaperBin = vbPRBNLower         ' set to 2 but upper tray
is selected
    End With
    pageTitle = "This is my page title"
    With Printer
        .ScaleMode = vbCentimeters
        .Font.Name = "Times New Roman"               'lools like Arial
to me
        .Font.Size = 10
        .Width = 18
        .Height = 27
        .CurrentX = 2 + (18 - .TextWidth(pageTitle)) / 2
        .CurrentY = 3 - .TextHeight(pageTitle) * 2
        .FontBold = True
        Printer.Print pageTitle                 ' This line is not
printed at all
        .FontBold = False
        .CurrentY = 3
        For i = 0 To 100
            .CurrentX = 2
            Printer.Print "This is line " & i   ' starts a new page at
line 22, line 50 etc
       Next i                                          ' and it's all in
Bold.
        .EndDoc
    End With
End Sub



Mon, 17 Sep 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Simple (?!) printing problem

2. Simple Newbie Print Problem

3. simple printing problem?

4. Simple print listbox to disk problem!

5. Help with simple VB Printing Problem

6. Simple Problem....Want to print files as if from Windows Explorer

7. Simple printing problem

8. A simple Mail problem in search for a equally simple answer

9. Simple Question: Printing

10. Simple printing with VB.NET?

11. Simple Printing Question

12. Simple question: - Printing to Text Box

 

 
Powered by phpBB® Forum Software