# Re: 列印 And 套表

Posted by 小贤 on August 19, 1997 at 20:28:49:

In Reply to: Re: 列印 And 套表 posted by 小吴 on August 18, 1997 at 17:49:13:

: 在自己列印方面：你有没有忘记 TextWidth 这个函式呢？利用这个指令就可以轻易地做到向右对齐了呀！

我写了程式如下请您看看有没问题:
Private Sub Command1_Click()
Me.ScaleMode = 7
Printer.ScaleMode = 7
Printer.FontName = "新细明体"
Printer.FontSize = 10
Printer.Print ""
Do Until Data1.Recordset.EOF
字宽 = TextWidth(Format(Data1.Recordset("钱"), "#,###"))
x = 3 - 字宽 '右边界
Printer.CurrentX = x
Printer.Print Format(Data1.Recordset("钱"), "#,###")
Data1.Recordset.MoveNext
Loop
Printer.EndDoc
end sub

结果印出来还是无法向右对齐!
如果是印在表单上,可以对齐!! 请问 问题出在那里呢??

Follow Ups: