I have a web app that allows users to upload ms word documents to a folder. I have a reference to MS Word. After the file is saved as a .doc file, I would like to convert it to html. My code is as follows:
The problem is, everytime it attempts to set app = new word.application, I receive an error message saying access is denied.
I'm stumped at this point. Any help would be greatly appreciated.
Code:
Private sub convertToHtml(ByVal documentPath as string, ByVal htmlPath as string)
Dim app as word.application
app = new word.application
dim doc as word.document = app.documents.open (documentPath)
dim newFilePath as string = htmlPath & Path.GetFileName(documentPath)
doc.SaveAs(newFilePath, 8)
app.Documents.Close()
GC.Collect()
End Sub
The problem is, everytime it attempts to set app = new word.application, I receive an error message saying access is denied.
I'm stumped at this point. Any help would be greatly appreciated.