Load audio file into Media Player control

N

news.microsoft.com

Hello, I've created an Outlook add-in with a Form region that contains
Windows Media player control, all works fine when running it, but my
question is how do I have the media control load the audio file that is
attached to the email when I open the email.

These message have their own message class with the form is associated with,
and they always contain one wave file.

Thanks
Frank
 
K

Ken Slovak - [MVP - Outlook]

Get the Attachments collection of the item in question and iterate each
Attachment member object until you find the wave file. You can check the
Attachment.FileName property to see if the wave file extension is there.
Once you've found the attachment use the Attachment.SaveAsFile method to
save it to the file system, perhaps to a temp file, then call the player to
work with that file. After you are finished you may want to delete the
temporary file.
 
F

Frank

Thank you that did the trick... I was hoping that there would be some
"built-in" function that would allow me to access the file directly... but
the suggestion worked just as good.

Thank you
Frank
 

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