Visual Basic .NET » Windows Registry and File I/O
Writing a Word Document from ASP.NET using VB -- cyrilkearney --


I am trying to write a Word Document from ASP.NET using VB.

I have had some success but still have problems.

Response.ContentType = "application/vnd.msword"
Response.AddHeader("Content-Disposition",
"attachment;filename=myfile.doc")
Response.Write("My Text")

However, this first puts up a message box asking if I want to open or save the file. I'd like to programatically answer this question.

When I select open it displays a error page saying Action Canceled Internet Explorer was unable to link to the Web page you requested. The

page might be temporarily unavailable.
I'd like to eliminate this

Finally my Word Document appears and can be saved.

When I select the save option from the message box that asked open or save the Action Cancel error page appears along with a normal word document save box which works properly.

Anyone have any experience that can help me clean up this interface?

[Submit Comment]Home