e.Form.Page.Width = 300 '纸张宽度为100毫米
e.Form.Page.Height = 300 '纸张高度为120毫米
e.Form.Page.LeftMargin = 0 '设置左边距
e.Form.Page.RightMargin = 5 '设置右边距
e.Form.Page.TopMargin = 7 '设置上边距
e.Form.Page.BottomMargin = 5 '设置下边距
e.Form.Page.Landscape = True '横向打印
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
doc.Preview()