报表打印时,怎么设置页边距和横着打啊,我用下面的代码不能控制横打和边距,另外,一般出货的四联针打纸,要选哪个纸张代码?
Dim Book As New XLS.Book(ProjectPath & "Attachments\出货单.xls")
Dim fl As String = ProjectPath & "Reports\出货单.xls"
Book.Build()
Book.Save(fl)
Dim Book1 As New XLS.Book
Dim Sheet As XLS.Sheet = Book1.Sheets(0)
With Sheet.PrintSetting
.PaperKind = 9 '设为A4纸
.LandScape = True '横向打印
.MarginLeft = 10 '左右边距设为20毫米
.MarginRight = 10
.MarginTop = 5 '上下边距设为15毫米
.MarginBottom = 5
End With
Dim Proc As New Process
Proc.File = fl
Proc.Verb = "Print"
Proc.Start()