Load audio file into Media Player control

Status
Not open for further replies.
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.

"news.microsoft.com" <frank@new.scom> wrote in message

news:eZzCx59oJHA.5412@TK2MSFTNGP04.phx.gbl...
> 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
>
 
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
<kenslovak@mvps.org> wrote in message

news:uPzuIx%23oJHA.1288@TK2MSFTNGP02.phx.gbl...
> 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.

> >

>

> "news.microsoft.com" <frank@new.scom> wrote in message
> news:eZzCx59oJHA.5412@TK2MSFTNGP04.phx.gbl...
> > 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
> >

>
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
J VB6 Add-in fails to load in Outlook 16 - message useless Outlook VBA and Custom Forms 4
A How can I load a HTML template into the WordEditor? Outlook VBA and Custom Forms 3
Diane Poremsky Always Load an Outlook Addin New Slipstick.com Articles 1
William getting custom form to load category colors Outlook VBA and Custom Forms 4
J BCM 2013 in Outlook 2013 will not load BCM (Business Contact Manager) 5
H Macro to load an Outlook Template Using Outlook 2
M Load a template when you reply Using Outlook 1
C Outlook Folders Slow to Load Using Outlook 2
S Load balance Autodiscover with multiple CAS servers. Exchange Server Administration 2
S Load balance Autodiscover with multiple CAS servers. Exchange Server Administration 3
P MS Outlook 2007 sends email OK. Receives junk mail in junk folder OK. Does not not load received ma Using Outlook 1
J Exchange 2010 SP1 fails at Mailbox Error Unable to load exrpc32.dll Exchange Server Administration 4
D Can not find your mail folders by default. An unexpected error has occurred. MAPI was unable to load Using Outlook 2
D Exchange 2010 Load Generator Error Exchange Server Administration 0
R Outlook takes 3 minutes to load. Using Outlook 2
M Outlook will not load new email. Using Outlook 8
K I loaded Office Home and Business 2010 and Outlook will not load. I still have Outlook 2007 Using Outlook 3
M Load pictures__ Using Outlook 1
L trying to load my archived emails into new outlook on new harddrive. error message says I do not have permission Using Outlook 2
W unable to load free personal data Using Outlook 1
A Outlook 2007 addin does not load in other machines Using Outlook 1
G Installed Office 2010 for home and business. All work but OutLook. It will not load. Error screen says that it cannot connect to the email. Using Outlook 2
B Need to load my contacts list and information from my office outlook - older version to my home outlook 2010 Using Outlook 1
B Outlook can't load mail folders Using Outlook 6
G email graphics load slowly while downloading emails in Outlook Using Outlook 1
R New mail will not load Using Outlook 1
S What to Use Instead a Hardware-based Load Balancer for an Exchange 2010 CAS Array Exchange Server Administration 21
B OUTLOOK my send/recieve is trying to load over 1000 emails Y Using Outlook 1
R The Module DLL P:\exchange\bin\kerbauth.dll failed to load the data is error. OWA, EMC and Powershel Exchange Server Administration 7
S Outlook wont load - looking for microsoft exchange Using Outlook 1
S CAS Load Balancing with Cisco IOS SLB - anyone done it? Exchange Server Administration 2
S Hub/CAS dual role - load balancing query Exchange Server Administration 3
S CAS Load Balancing ?? Exchange Server Administration 5
S Hub/CAS Load balance later on? Exchange Server Administration 6
E Exchange 2007 multi-site cluster and load balancing Exchange Server Administration 2
L Can't populate History of Business Contacts- receive 1st error: cannon load an object because it is not available, then 2nd: Cannot display this view Using Outlook 1
R Load balancing CAS multiple ways Exchange Server Administration 3
B Outlook 2010 will not start. Tries to load, but states "processing".... Using Outlook 1
R Cannot load or delete saved .msg files; Outlook locks up, can only delete file with Linux Using Outlook 2
W Outlook for Enterprise 2007 will not load Using Outlook 1
B e-mails with attachments or graphics (logos, etc.) in the body of the e-mail take a long time (1 minute) to open. Doesn't take long to load. Using Outlook 1
S OWA login page extremely slow to load when accessed from internet.... Exchange Server Administration 1
M Error message: Cannot load person free\busy data. Eerror in c:\users\computer name\appdata\local\m Using Outlook 1
O I have a 64bit Win7 &amp; Office 2010. I wish to load up the LinkedIn Social connector but can't locate it.__Can you assist? Thx az Using Outlook 3
D no code is given, but overnight the outlook would not load Using Outlook 1
S Exchange 2010 Management Powershell missing after installing SP1 Unable to load Exchange Server exshell.psc1 Exchange Server Administration 1
M Office 2010 will not load windows server 2003 Using Outlook 2
K Will not load emails from server Using Outlook 2
K I just cant get my email. It won't load and my domain (charter.net) tells me that its a microsoft issue even tho I cant get my mail thru their websit Using Outlook 1
A Office XP SBE - Outlook will not load, run, start etc. Using Outlook 5
Similar threads


















































Top