FOR EACH loAttachment in toMsg.Attachments lcFileName = loAttachment.fields.item(cdoAttachmentFilename).value lcMediaType = loAttachment.fields.item(cdoContentMediaType).value loStream = loAttachment.GetDecodedContentStream() lwStream = loStream.Read() INSERT INTO (lcTodayAttach) ; (iTimeId, cFileName, cMediaType, wAttachmnt) VALUES (lnTimeId, lcFileName, lcMediaType, lwStream) ENDFOR
Only problem is occationally 'lwStream = loStream.Read()' causes error: OLE IDispatch exception code 0 from ADODB.Stream: Operation is not allowed in this context...
Just a thought but is there any way persisting and writing the whole object loStream to a field or file so that I can examine it's properties outside of the COM object?