Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: how to download attachment file


Message #1 by venkat bonam <venkatbonam@y...> on Thu, 19 Jul 2001 22:30:14 -0700 (PDT)
Problem  1



Other than textfiles i am able to download the

attachment but unable to see it in a correct format ie

incorrect mimetype for example image file are

displaying in ascii format



problem 2



Insted of Attached Text files, Messageview file is

downloading as it was shown in the browser and unable

to downlaod the text content of the Attached file.





so will u give any suggestion to dispay it in a

correct format.











Const CdoPR_ATTACH_DATA_BIN = &H37010102

bstrFileName = objAttachment.Name

Response.Write bstrFileName

Response.AddHeader

"Content-Disposition","attachment;filename=" & 

bstrFileName

Set

objRenderApp=Server.CreateObject"AMHTML.Application")

Set objRend = objRenderApp.CreateRenderer(2)

Set objRenderAtt = objRend

objRenderAtt.DataSource = objAttachment

objRend.RenderProperty

CdoPR_ATTACH_DATA_BIN,0,Response

set objRend = Nothing

set objAttachment = Nothing




  Return to Index