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.
Similar threads
Thread starter Title Forum Replies Date
D Outlook 2016 Unable to load Outlook data pst file Using Outlook 5
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
A Not able to load an add-in for outlook 2007 developed in VSTO 2005 Outlook VBA and Custom Forms 2
S COM Addin Failed to load in Outlook 2003 Outlook VBA and Custom Forms 1
S Outlook 2007 Add-in strange load behavior Outlook VBA and Custom Forms 10
G "Cannot load GUI library into memory" Outlook VBA and Custom Forms 3
D Why does BCM not always load when I restart Outlook? BCM (Business Contact Manager) 1
G Using VBA to load the CC line on an Outlook email Outlook VBA and Custom Forms 2
S BCM does not load in Windows 7 BCM (Business Contact Manager) 1
P Can you load an OlkComboBox and show a previously selected value? Outlook VBA and Custom Forms 1
W My VSTO 3.0 Outlook addin doesn’t load Outlook VBA and Custom Forms 1
P What is it, and why won't it load? BCM (Business Contact Manager) 10
M VBA Form how to load in Outlook 2003 Outlook VBA and Custom Forms 4
S Business Data Import and Export Load Error Cannot Map BCM (Business Contact Manager) 1
D Outlook AddIn can't load outside Visual Studio Outlook VBA and Custom Forms 1
D Application.ActiveInspector() is Null on Ribbon Load Outlook VBA and Custom Forms 1
Q Load a recipient based on a value in a combo box Outlook VBA and Custom Forms 7
S Business contact manager will not load? databinding? BCM (Business Contact Manager) 2
J add-in won't load Outlook VBA and Custom Forms 12
O Comma Separated Values.ADR and A file error has occurred in the translator Using Outlook 5
R Problem moving file “Email folders.pst” to new PC Using Outlook 5
B vBA for exporting excel file from outlook 2016 Outlook VBA and Custom Forms 3
V Pin a document to the "Attach file" Recent Documents list Using Outlook 0
K Need to convert .mmf file to .pst format Outlook VBA and Custom Forms 7
S save attachment with date & time mentioned inside the file Outlook VBA and Custom Forms 0
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
B Can I create a local PST file for SPAM on a drive that is usually disconnected? Using Outlook 3
C Macro to extract sender name & subject line of incoming emails to single txt file Outlook VBA and Custom Forms 3
P Outlook pst file is too huge with POP3. How to save more space? Using Outlook 4
G Cannot Move Autocomplete File to New Computer Using Outlook 15
B Outlook 2013 erratically deleting original file that is attached Using Outlook 0
I Outlook 365 - import/attach PST file that used POP3 Using Outlook.com accounts in Outlook 0
M Deleting attachments does not reduce file size Using Outlook 0
P PST file is getting huge under POP 3 Using Outlook 2
I Saving attachments from multiple emails and updating file name Outlook VBA and Custom Forms 0
F Script for zip file attachment Outlook VBA and Custom Forms 1
M Export-Import .pst file problems Using Outlook 2
L Cannot open PST file for first session each day Using Outlook 6
L How to Import Exchange OST file into Outlook? Using Outlook 3
J Outlook 2010 Changing events in Outlook calendar via opening file, importing CSV Using Outlook 0
C Can't create Outlook data file Outlook Wishlist 0
S What's in a PST file? Using Outlook 1
S automate save the .xlxs file to share Network Using Outlook 1
L Outlook Office 365 client: won't remember my setting File, not to collapse ribbon Using Outlook 2

Similar threads

Top