cdo + Attachment + wave file

M

Mita Garg

Hi All,

I can retreive the Attachment object say for example a wave file
"recording.wav" and read the actual data in the wave file from the
mail using the code below

Dim objSession as MAPI.Session
Dim objFolder as MAPI.Folder

Set objSession = CreateObject("MAPI.Session")
objSession.LogOn
Set objFolder = objSession.GetDefaultFolder(1) 'Inbox
Set objMessage = objFolder.Messages.GetLast()
Set objAttachment = objMessage.Attachments.Item(1)
msg = objAttachment.Feilds(CdoPR_ATTACH_DATA_BIN).Value

Now the msg has actual data

"524946465E49030057415645666D74201200000007000100401F0000401F000001000800000066616374040000002B490300646174612B4903007A6A6D6C777FFEFBF97DFBF8EAE7E6E9F8FEFE7FFCF0E4E1E1E4E7E9ECF3FE7D7A746766686D6D6F7270666467686770F87A79FDECEDECE7E6EBE5E2E2E1DEDBD7D6D7"

What i want do is say for example if i pass the same data into the
Attachment Object, how do i convert it to wave file when sending the
message, so that when i receive a mail it should have a wave
attachment.

Your help will be apprciated.

Tks Mita
 
N

neo [mvp outlook]

i'm not quite sure what you are asking so here goes with what i think you
might be asking...

1) how do i save an embedded gif/jpg/wav to the file system and
2) once saved to the file system, re-attach it to a new message (in this
case, i will assume that you don't want to embed it.)

right or wrong track?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top