以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  打印  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=17217)

--  作者:caoxy
--  发布时间:2012/3/7 9:22:00
--  打印

各位师傅好:

按照范例打印代码

If Functions.Execute("net20sp1") = False Then
    Return
End If
Dim Book As New XLS.Book(ProjectPath & "Attachments\\统计表.xls")
Dim fl As String = ProjectPath & "Reports\\统计表.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)
Ws.PrintOut
App.Quit

红色部位如何改,请师傅指点,谢谢!


--  作者:狐狸爸爸
--  发布时间:2012/3/7 11:37:00
--  

你现在应该看帮助,而不是看范例,你不会1、2、3,怎么研究x、y、z.
 
把这三行代码删除:


If Functions.Execute("net20sp1") = False Then
   Return
End If

 

这是多余的。