我在窗口中的一控件,写入 了以下代码,以及附件中的模板。各位帮我看看要怎么样才能进行页面设置,以及纸张的选择,并且直接打印。当然要是能够帮我看下模板中怎么设置自动满页是最好的了,我根据帮助上加了“-9”可是就不能填充数据了。谢谢各位。
Dim ckdh As WinForm.TextBox =e.Form.Controls("出库单号")
Dim rq As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim kg As WinForm.TextBox = e.Form.Controls("制单")
Dim Book As New XLS.Book(ProjectPath & "相关文件\mb2.xls")
Dim fl As String = ProjectPath & "Reports\mb2.xls"
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Sheet(1,2).Value = " "& rq.text &""
Sheet(1,9).Value = " "& ckdh.text &""
Sheet(4,2).Value = " "& kg.text &""
Sheet(3,10).Value = "<出库单号 = '"& ckdh.text &"'>"
Book.Build()
Dim Proc As New Process
Proc.File = fl
Proc.Start()