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
 
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
>
 
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 Using Outlook 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
C Advanced search terms for "Outlook Data File" Using Outlook 1
G Save emails as msg file from Outlook Web AddIn (Office JS) Outlook VBA and Custom Forms 0
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
W Outlook 365 File access denied attempting to import .pst Using Outlook 6
P Copying ALL calendar entries from Calender in PST file to IMAP OST file? Using Outlook 1
R Saving Emails and Attachments as .msg file Using Outlook 3
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
W Create a Quick Step or VBA to SAVE AS PDF in G:|Data|Client File Outlook VBA and Custom Forms 1
Wotme create email only data file Using Outlook 1
C "The linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link points to the correct file location" Using Outlook 1
L Restoring Outlook from backup pst file Using Outlook 5
W Transfer Outlook 2016 autocomplete file to Outlook 2007 Using Outlook 1
V Backup Calendar, Contacts, Tasks in an POP3 data file Using Outlook 3
DoctorJellybean Use OST file location for fresh installation? Using Outlook 1
HarvMan Exporting IMAP OST file to PST Using Outlook 5
P File Picker for attachment Outlook VBA and Custom Forms 0
D Forwarding email based on the attachment file type and specific text found on the attachment file name Outlook VBA and Custom Forms 1
N File Picker for attachment Outlook VBA and Custom Forms 2
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
L Article on merging pst file Using Outlook 1
J Deliver new messages to New or Existing Data File? Using Outlook 2
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
A Macro to file emails into subfolder based on subject line Outlook VBA and Custom Forms 1

Similar threads

Back
Top