Word Automation in Web App

P

P1ayboy

I am curently developing a web app that needs to take a word doc,complete a
find and replace and then save as a new doc. Unfortunatley when I run the
following code, all i get is a "command failed" error.

Dim fileName = "D:\contract.doc"
Dim WordApp As New Word.Application()
'WordApp.Documents.Open(fileName)
WordApp.Documents.Add(fileName)

I have imported the appropriate word 11 dll.

Please help!

Thanks

Rob
 
Top