|
 |
asp_cdo thread: how to download attachment file from body & link
Message #1 by venkat bonam <venkatbonam@y...> on Wed, 18 Jul 2001 04:04:20 -0700 (PDT)
|
|
Set objAttachment = objMessage.Attachments(1)
file is down loading but unable to see the content in
it i.e is image or text file
iam following the code bellow, please suggest me my
mistakes if any
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
Message #2 by Stephen Shek <stephen.shek@s...> on Wed, 18 Jul 2001 12:28:02 +0100
|
|
Hi there
I had the same problem I think
are you having problems actually viewing the attachment or what
if so
then comment out the response.write bstrfileName
and set your objSession to logoff under your
set objAttachment =3D nothing
ie set ObjSession.Logoff
try this and it should work :)
-----Original Message-----
From: venkat bonam [mailto:venkatbonam@y...]
Sent: 18 July 2001 12:04
To: ASP CDO
Subject: [asp_cdo] how to download attachment file from body & link
Set objAttachment =3D objMessage.Attachments(1)
file is down loading but unable to see the content in
it i.e is image or text file
iam following the code bellow, please suggest me my
mistakes if any
Const CdoPR_ATTACH_DATA_BIN =3D &H37010102
bstrFileName =3D objAttachment.Name
Response.Write bstrFileName
Response.AddHeader
"Content-Disposition","attachment;filename=3D" &
bstrFileName
Set objRenderApp =3D
Server.CreateObject("AMHTML.Application")
Set objRend =3D objRenderApp.CreateRenderer(2)
Set objRenderAtt =3D objRend
objRenderAtt.DataSource =3D objAttachment
objRend.RenderProperty
CdoPR_ATTACH_DATA_BIN,0,Response
set objRend =3D Nothing
set objAttachment =3D Nothing
|
|
 |