Dim fn As Object = path.Replace(path.Split(".")(1), "htm")
Dim st As Object = WordApp.WdSaveFormat.wdFormatHTML
Dim file As FileInfo = New FileInfo(fn.ToString)
If Not file.Exists Then
Dim missingValue As Object = Type.Missing
Dim wapp As WordApp._Application = New WordApp.Application
Dim openfile As Object = path
Dim doc As WordApp._Document = wapp.Documents.Open(openfile, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue)
doc.SaveAs(fn, st, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue)
doc.Close(missingValue, missingValue, missingValue)
wapp.Quit(missingValue, missingValue, missingValue)
Response.Redirect("./upfile/ppt/" + file.Name)
Else
Response.Redirect("./upfile/ppt/" + file.Name)
End If