Dim f As String = e.Form.Controls("ComboBox1").value
Dim TemplateName As String = ProjectPath & "Attachments\" & f
Dim ReportName As String = ProjectPath & "Reports\" & f
Dim Doss As New WordReport(Tables("销售出库"), TemplateName, ReportName)
Doss.BuildOne(Tables("销售出库").Current)
Doss.Show()
Dim app As New MSWord.Application
Dim WordD As MSWord.Document = app.Documents.Open(ReportName)
With WordD.PageSetup
'.LineNumbering.Active = False
.Orientation = False '''''''页面方向为纵向
.TopMargin = 3.3 '''''''''''上边距
.BottomMargin = 3.3 '''''''''''''''''下边距
.LeftMargin = 2.8 '''''''''''' '左边距
.RightMargin = 2.8 '''''''''''''右边距
.Gutter = 0 '''''''''''''''''''装订线
'.HeaderDistance = 1.5 '''''''''''''''''''页眉
'.FooterDistance = 1.8 '''''''''''''页脚
.PageWidth = 21 ''''''''''页面宽度
.PageHeight = 14 '''''''''''页面高度'
'.OddAndEvenPagesHeaderFooter = False '不勾选"奇偶页不同"
'.DifferentFirstPageHeaderFooter = False '不勾选"首页不同"
'.SuppressEndnotes = False '不隐藏尾注
'.MirrorMargins = False '不设置首页的内外边距
'.TwoPagesOnOne = False
'.BookFoldPrinting = False
'.BookFoldRevPrinting = False '不设置手动双面打印
'.BookFoldPrintingSheets = 1 '默认打印份数为1
End With
WordD.PrintPreview()
生成还是达不到210*140打印格式设置的效果
哪里出错了呢????
这个连打搞了我好几日了