Shady Level: VB Guru

 Registered: 08-07-2002 Posts: 305
|
Re: printing alignment
Hi there stacey,
I'm a little rusjed at the moment, but stick the following code underneath a button, and try it out, it should be all the code you need to invoke BOLD/ITALICS etc, and it will right align your text.
Private Sub Command1_Click()
Printer.FontName = "Times New Roman"
Printer.FontSize = "16"
Printer.CurrentX = Printer.ScaleWidth - Printer.TextWidth("123456")
Printer.Print "123456"
Printer.FontBold = True
Printer.CurrentX = Printer.ScaleWidth - Printer.TextWidth("12345")
Printer.Print "12345"
Printer.FontBold = False
Printer.FontItalic = True
Printer.CurrentX = Printer.ScaleWidth - Printer.TextWidth("1234")
Printer.Print "1234"
Printer.FontItalic = False
Printer.FontUnderline = True
Printer.CurrentX = Printer.ScaleWidth - Printer.TextWidth("123")
Printer.Print "123"
Printer.FontUnderline = False
Printer.EndDoc
End Sub |
Any problems, post back
Regards
Shady
____________________________
I don't wanna die... but I ain't keen on livin' either
|