以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=128422)

--  作者:18825761682
--  发布时间:2018/12/5 19:56:00
--  [求助]
请教:如下代码,需要实现打开文件后再打开文件所在的文件夹:(C:\\Users\\a1898\\Desktop\\单据\\派车单),请教如何编写代码


Dim Book As New XLS.Book(ProjectPath & "Attachments\\中凯派车单.xls")
Dim r As Row = Tables("PC").current
Dim fl As String = "C:\\Users\\a1898\\Desktop\\单据\\派车单\\" & ("SO号") & r("订舱号") & ("派车单") & r("托运日期") & r("地址简称") & ".PDF"
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Sheet(1,13).Value = "<勾选 = # Ture #>"  \'写入打印条件
Book.Build() \'生成细节区
Book.SaveToPDF(fl) \'保存工作簿
Dim Proc As New Process \'打开工作簿
Proc.File = fl
Proc.Start()

--  作者:有点甜
--  发布时间:2018/12/5 20:55:00
--  

Dim Book As New XLS.Book(ProjectPath & "Attachments\\中凯派车单.xls")
Dim r As Row = Tables("PC").current
Dim fl As String = "C:\\Users\\a1898\\Desktop\\单据\\派车单\\" & ("SO号") & r("订舱号") & ("派车单") & r("托运日期") & r("地址简称") & ".PDF"
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Sheet(1,13).Value = "<勾选 = # Ture #>"  \'写入打印条件
Book.Build() \'生成细节区
Book.SaveToPDF(fl) \'保存工作簿
Dim Proc As New Process \'打开工作簿
Proc.File = fl
Proc.Start()

Proc = New Process \'打开工作簿
Proc.File = FileSys.GetParentPath(fl)
Proc.Start()