Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

center align text on VB print output

Status
Not open for further replies.

moestroz

MIS
Jul 29, 2004
8
US
How does one center align text on a print output from VB rather than using X Y coordinates? This is what I have so far, but I would like the two lines of text to always center no matter what part number prints... tia. Maureen

iNumCopies = 1
LoadLbl = MsgBox("Large " & Lblinternaldel & " label required for " & Lblrscitemno & ". Load label stock in Printer.", 1, "AUME Special Label")
If LoadLbl = 2 Then GoTo errHandler
CommonDialog1.CancelError = True
On Error GoTo errHandler
CommonDialog1.ShowPrinter
CommonDialog1.FromPage = 1
CommonDialog1.ToPage = 1
NumCopies = CommonDialog1.Copies
For iNumCopies = 1 To NumCopies
On Error GoTo 0
Printer.Orientation = 2 '2 = Landscape
Printer.FontName = "Arial"
???? Printer.CurrentX = 800
???? Printer.CurrentY = 2000
Printer.FontSize = 150
Printer.FontBold = True
Printer.Print Lblcustitemno
???? Printer.CurrentX = 4600
???? Printer.CurrentY = 6000
Printer.FontSize = 160
Printer.FontBold = True
Printer.Print Format(Lblqty, "#####0")
Printer.EndDoc
Next iNumCopies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top