--
Dim ftp1 As new ftpclient
ftp1.host="10.60.128.146"
ftp1.Account = "ftpuser"
ftp1.password = "bnm,./123"
Dim lj As String = Tables("主窗口_table1").Current("路径")
Dim fp As String = lj
Dim wjm As String = Tables("主窗口_table1").Current("文件名")
Dim hz As String = Tables("主窗口_table1").current("后缀")
msgbox(projectpath & "RemoteFiles\\" & wjm)
If ftp1.Download(fp,projectpath & "RemoteFiles\\" & wjm) = True Then
e.Form.text = "浏览器 正在打开中...."
If hz = "doc" Or hz = "docx" Then
Dim tmp As String = projectpath & "RemoteFiles\\" & wjm
Dim mht As String = projectpath & "RemoteFiles\\ & wjm & .mhtml"
Dim app As New MSWord.Application
Dim doc = app.Documents.Open(tmp)
doc.SaveAs(Filename:=mht , FileFormat:=MSWord.WdSaveFormat.wdFormatWebArchive)
app.quit
e.Form.text = "浏览器"
e.Form.Controls("WebBrowser1").Address = mht
蓝总:早上好!现在能将WORD转为MHTML格式并在窗口打开,但是mht的定义路径 写的有问题,转换的文件名变成“& wjm & .mhtml”,不能正常显示文件名,每次文件名都一样,导致转换卡顿。