Dim ename As String
If _UserGroup = "校长" Or _UserGroup = "教导处" Then
ename = "在籍学生基本信息"
Else If _UserGroup = "班主任" Then
ename = "基本信息"
End If
If ename > "" Then
Dim Book As New XLS.Book(ProjectPath & "Attachments\" & ename & ".xls")
Dim fl As String = ProjectPath & "Reports\" & ename & ".xls"
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
Ws.PrintPreview
App.Quit
End If