以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 如何在打印按钮中设置横向打印 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=139327) |
-- 作者:zyxhx -- 发布时间:2019/8/11 12:49:00 -- 如何在打印按钮中设置横向打印 老师:请问如何在打印按钮中设置横向打印?以下代码如何修改,请老师指教: Select Case e.StripItem.Name \'慢病人员花名册 Case "print1" e.Form.Strips("主菜单").Items("printgxy").BaseControl.HideDropDown \'退出主菜单下的项目菜单"print" Dim Book As New XLS.Book(ProjectPath & "Attachments\\慢病人员花名册.xlsx") Dim fl As String = ProjectPath & "Reports\\慢病人员花名册.xlsx" Book.Build() Book.Save(fl) Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) Ws.PrintOut App.Quit Case "PrintPreview1" \' e.StripItem.ParentItem.BaseControl.HideDropDown \' Application.Doevents \'退出子菜单项目 e.Form.Strips("主菜单").Items("printgxy").BaseControl.HideDropDown \'\'退出主菜单下的项目菜单"print" Dim Book As New XLS.Book(ProjectPath & "Attachments\\慢病人员花名册.xlsx") Dim fl As String = ProjectPath & "Reports\\慢病人员花名册.xlsx" Book.Build() Book.Save(fl) Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) App.Visible = True ShowAppWindow("慢病人员花名册",2) Ws.PrintPreview App.Quit Case "edit1" e.Form.Strips("主菜单").Items("printgxy").BaseControl.HideDropDown \'\'退出主菜单下的项目菜单"print" Dim Book As New XLS.Book(ProjectPath & "Attachments\\慢病人员花名册.xlsx") Dim fl As String = ProjectPath & "Reports\\慢病人员花名册.xlsx" Book.Build() Book.Save(fl) Dim Proc As New Process Proc.File = fl Proc.Start() End Select |
-- 作者:有点蓝 -- 发布时间:2019/8/11 22:33:00 -- 参考:http://www.foxtable.com/webhelp/topics/1312.htm |