For starters, office automation on a web server really isn't recommended.
http://support.microsoft.com/kb/257757[
^]
Is Office correcrly installed on the web server? Does the account running the web process have permissions to all the relevant locations. Any messages in event viewer?
Why not try wrapping your statement in a try-catch block, and then log the Exception to a file.
try
{
Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "New" + ".docx");
object fileName = path;
object readOnly = false;
object startIndex = 0;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
WordApp.Visible = true;
Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Add();
}
catch (Exception ex)
{
MyLogger.Log(ex.Message);
}
But really, you shouldn't be doing this. You do understand this is happening on the server, right? It's not going to show anything on the client.