Alex
Guest
|
Posted:
Fri Dec 23, 2005 1:58 am Post subject:
Get attachments during an asynch OnSave event |
|
|
Hi,
I wrote a copy object to process an email as it's being saved into a public
folder. Information about it is placed into a SQL db
The code is attached to an asynch onSave event.
At this point, I need to see what (if any) attachments this email has, and
list their names.
I can see if there are attachments by checking oRecord.Fields[
"urn:schemas:httpmail:hasattachments" ].Value
However, I don't get any specific attachment information from the Fields of
the record
I tried to use OOM, but the item doesn't exist yet.
CDO gave me an issue with the MessageClass.Open or
MessageClass.DataSource.Open()
according to MS docs, RecordOptions must be set to adOpenAsynch. But I get
an run time exception telling me that Asynchronous binding is not supported
by the provider. Regardless, I feel that even if I figure out how to open
it, the item still won't be there..
MS docs are here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_idatasource_openobject.asp
What am I missing here? Is there a way to get this out of the Fields
collection of the ADO record?
oRecord is defined as follows
public void OnSave(Exoledb.IExStoreEventInfo pEventInfo, string bstrURLItem,
int lFlags) {
// Get the EventInfo and convert it so we can use it
Exoledb.IExStoreDispEventInfo pNewEventInfo =
(Exoledb.IExStoreDispEventInfo)pEventInfo;
// Cast an ADODB record.
ADODB.Record oRecord = (ADODB.Record)pNewEventInfo.EventRecord;
Thanks in advance
Alex
|
|