|
 |
asp_cdo thread: Now i want to retrive attachments
Message #1 by "Sameeta Chikhlikar" <sameeta_c@h...> on Tue, 27 Feb 2001 10:02:49
|
|
Hello their,
How to retrive attachments using CDO for exchange 2000
I am creating an instance of a message stored in WSS using 'dataurl' with
CDO.
Now i want to retrive attachments.
I am trying to do this using fields in the 'urn:schemas:mailheader:
namespace'
and 'urn:schemas:httpmail: namespace'.
i.e.
1) urn:schemas:httpmail:hasattachments
2) urn:schemas:httpmail:attachmentfilename
3) urn:schemas:mailheader:content-disposition
As per MSDN online, this should return attachment related information stored
with the message.
But I am not getting any such output.
Even CDO.Attachments returns nothing.
How do i proceed? Is there any other way/solution.
Give me solution
Thanx in advance
Sameeta
Message #2 by "jamal mustafa" <jamal@w...> on Wed, 28 Feb 2001 14:24:48 +0500
|
|
hi,
Check this code. it checks for attachments in the message objects, where
objMessage is a message type of object containing current message record and
iAttach is simply an Interface. u dont need to set it to some class.
Dim iAttach
Set iAttach = objMessage.Attachments
AttachmentCount = iAttach.Count
and to retrieve the attachments use:
For Each atch in objMessage.Attachments
atch.SaveToFile "C:\" & atch.FileName
Next
i hope it will solve ur problem.
Jamal Mustafa
Cybersoft Technologies
Voice : (92-42) 5857533-4 (Ext: 211)
Lahore , Pakistan.
Message #3 by "sameeta chikhlikar" <sameeta_c@h...> on Wed, 28 Feb 2001 13:21:13
|
|
hi,
thanx for the reply
i have tried with the code that u have suggested.
but,
Set iAttach = objMessage.Attachments
AttachmentCount = iAttach.Count
I get this count as zero. whereas hasattachment property returns TRUE. what
could be the reason.
I am using evaluation version of exchange 2000. could this be a problem, or
any thing else.
Thanx in advance
sameeta
>From: "jamal mustafa" <jamal@w...>
>Reply-To: "ASP CDO" <asp_cdo@p...>
>To: "ASP CDO" <asp_cdo@p...>
>Subject: [asp_cdo] Re: Now i want to retrive attachments
>Date: Wed, 28 Feb 2001 14:24:48 +0500
>
>hi,
>
>Check this code. it checks for attachments in the message objects, where
>objMessage is a message type of object containing current message record
>and
>iAttach is simply an Interface. u dont need to set it to some class.
>
>Dim iAttach
>
>Set iAttach = objMessage.Attachments
>AttachmentCount = iAttach.Count
>
>
>and to retrieve the attachments use:
>
>For Each atch in objMessage.Attachments
>
> atch.SaveToFile "C:\" & atch.FileName
>
>Next
>
>i hope it will solve ur problem.
>
>Jamal Mustafa
>Cybersoft Technologies
>Voice : (92-42) 5857533-4 (Ext: 211)
>Lahore , Pakistan.
|
|
 |