A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Load audio file into Media Player control



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 13th 09, 01:20 PM posted to microsoft.public.outlook.program_addins
news.microsoft.com[_7_]
external usenet poster
 
Posts: 1
Default Load audio file into Media Player control

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


Ads
  #2  
Old March 13th 09, 02:33 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Load audio file into Media Player control

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"news.microsoft.com" wrote in message
...
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


  #3  
Old March 16th 09, 12:56 PM posted to microsoft.public.outlook.program_addins
Frank[_9_]
external usenet poster
 
Posts: 1
Default Load audio file into Media Player control

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


"Ken Slovak - [MVP - Outlook]" wrote in message
...
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"news.microsoft.com" wrote in message
...
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




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Wiindow Media File into Email Cindy Outlook and VBA 1 April 18th 08 06:13 PM
Problem with Axis Media Control il barbi Outlook Express 18 January 29th 08 12:27 AM
how to load the the xml file in vc++ 2005 lencastro Add-ins for Outlook 0 January 19th 07 10:23 AM
Nero showtime Media player help ralphu chowdry Outlook Express 2 December 7th 06 09:34 PM
WMA player ...version 11 barney Outlook Express 1 November 24th 06 11:39 PM


All times are GMT +1. The time now is 01:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.