Foxtable(狐表)用户栏目专家坐堂 → 如何在打印按钮中设置横向打印


  共有2381人关注过本帖平板打印复制链接

主题:如何在打印按钮中设置横向打印

帅哥哟,离线,有人找我吗?
zyxhx
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:388 积分:3212 威望:0 精华:0 注册:2017/4/2 19:33:00
如何在打印按钮中设置横向打印  发帖心情 Post By: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

 回到顶部