Hi,
I am attempting to create an aspx page (using C#) with the exact formatting I require (set out using html/asp) and save it as a word document (.doc).
I am using the following simple code to do the document conversion:
Response.ContentType = "application/vnd.ms-word";
Response.AddHeader("Content-Disposition", "inline; filename=testfile.doc");
The problem is this actually saves as a .htm file type even though the extension is .doc (this becomes apparent when opening the document and going to save as). This means that the document has to download any images and the css from the web server each time the document is opened.
I need to be able to open the documents offline (ie. have all of the content including formatting and images stored in the .doc file) and so this is useless as it stands.
I am using Visual Studio .NET 2003.
Has anyone done anything like this before, and if so how? Any help would be appreciated.
Thanks,
Paul (RareRed)