ASP , MSWROD, IE version....

Results 1 to 2 of 2

Thread: ASP , MSWROD, IE version....

  1. #1
    Join Date
    Dec 1969

    Default ASP , MSWROD, IE version....

    Can any one help me in downloading the word document from a asp page.<BR>I am using a vb dll for generating the word document.<BR>the word document is stored in the database table(sybase).<BR>Datbase field is a BLOB type.<BR>The code I was using for viewing the word document was,<BR>*****Set aspResponse = GetObjectContext.Item("Response")<BR>*****asp Response.Expires = 0<BR>*****aspResponse.ContentType = "application/doc"<BR>It has not been worked out. if I display a pdf file it is opening fine.<BR>According to one of my freinds suggestion I changed my code like the following<BR><BR>Set aspResponse = GetObjectContext.Item("Response")<BR>aspResponse.E xpires = 0<BR>aspResponse.ContentType = "application/doc"<BR>aspResponse.AddHeader "Content-Disposition", "attachment; filename=myfile.doc"<BR>But this time it is saving as a ASP file not word file. and the data is also showing as junk.<BR>Then again <BR>I changed the code like the following<BR><BR>Set aspResponse = GetObjectContext.Item("Response")<BR>***aspResp onse.Expires = 0<BR>***aspResponse.Buffer = True<BR>***aspResponse.Clear<BR>****aspResp onse.ContentType = "application/msword"<BR>destination = "c:myfile.doc"<BR>Set stm = New ADODB.Stream<BR>****stm.Open<BR>stm.Type = adTypeBinary<BR>stm.LoadFromFile destination<BR>***aspResponse.BinaryWrite stm.Read<BR>***aspResponse.End<BR>stm.Close<BR> Set stm = Nothing<BR>now this time it is working on IE 6.0 only, But we have to support from I.E 4 onwards and netsacpe also.<BR>I am sure my first code should work, but I am thinking some settings to browser or my MSwrod needs to modify.<BR>I hope you understand my problem.<BR>Please give me a solution for this

  2. #2
    Join Date
    Dec 1969

    Default Possibly .....??

    I vaguely remember having this problem some time ago when opening PDF files in this fashion. If I remember correctly IE 4.0 - IE 5.0 do not expect the extension on the file name so try using the attachment filename without the extension for these versions. Good luck, I know theres not much specific documentation on this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts