\'自动打印费用单据
Dim doc As New PrintDoc \'定义一个报表
\'纸张设置
With Doc
.PageSetting.Width = CDec(Functions.Execute("printInfo","Width",210))
.PageSetting.Height = CDec( Functions.Execute("printInfo","Height",297))
.PageSetting.LeftMargin = CDec(Functions.Execute("printInfo","LeftMargin",10))
.PageSetting.RightMargin = CDec( Functions.Execute("printInfo","RightMargin",10))
.PageSetting.TopMargin = CDec( Functions.Execute("printInfo","TopMargin",10))
.PageSetting.BottomMargin = CDec(Functions.Execute("printInfo","BottomMargin",10))
.PageSetting.Landscape = Functions.Execute("printInfo","Landscape",False)
.AutoRotate = False
End With