word进程如何结束?已经困扰我好久了,谢谢大家来帮忙!
程序运行到读文件时System.IO.FileStream(filepath, IO.FileMode.Open)
有错误提示:
该进程无法访问文件“c:\inetpub\wwwroot\Air\AirWeb\信息管理\信息采编\Temp\23774240doc.html”,因为该文件正由另一进程使用。
我把word格式的文档转化成html文档,存在服务器端,可是在客户端无法打开
我的转化函数为:
Function ConvertToHtml(ByVal docPath As String, ByVal htmlPath As String)
Dim app As New Word.Application()
app.Visible = False
Dim o As [Object] = System.Reflection.Missing.Value
Dim docFile As Object = docPath
Dim doc As Word.Document = app.Documents.Open(docFile, o, o, o, o, o, o, o, o, o, o, o)
Dim fileName As Object = htmlPath
Dim format As Object = 8 'Html
doc.SaveAs(fileName, format, o, o, o, o, o, o, o, o, o)
end function
是不是word进程没有退出,该怎么退出呢?