How to play sound coming from OLE object field in VB 
Author Message
 How to play sound coming from OLE object field in VB

I have a table with a OLE object field called annonce.

When I open my table and I right click on the annonce
field and execute "sound recorder document object ->
play", it works fine. But I would like to do that in VB
in order to read my recordset a play the wave sound in
the annonce field. Is there any special fuction to do
that or samples ?

Many thanks in advance for your help

Vincent



Sat, 08 May 2004 22:37:49 GMT  
 How to play sound coming from OLE object field in VB
Take a look at this:

http://www.mvps.org/access/api/api0011.htm


Quote:
>I have a table with a OLE object field called annonce.

>When I open my table and I right click on the annonce
>field and execute "sound recorder document object ->
>play", it works fine. But I would like to do that in VB
>in order to read my recordset a play the wave sound in
>the annonce field. Is there any special fuction to do
>that or samples ?

>Many thanks in advance for your help

>Vincent



Sun, 09 May 2004 02:44:41 GMT  
 How to play sound coming from OLE object field in VB
Yes but if I understand, I need to provide the filename
with the extension and how can I extract the filename and
the extension from the OLE object ( wave object ) to
provide to the function ?

Tanks for your help

Quote:
>-----Original Message-----
>Take a look at this:

>http://www.mvps.org/access/api/api0011.htm



>>I have a table with a OLE object field called annonce.

>>When I open my table and I right click on the annonce
>>field and execute "sound recorder document object ->
>>play", it works fine. But I would like to do that in VB
>>in order to read my recordset a play the wave sound in
>>the annonce field. Is there any special fuction to do
>>that or samples ?

>>Many thanks in advance for your help

>>Vincent

>.



Sun, 09 May 2004 04:48:01 GMT  
 How to play sound coming from OLE object field in VB
You're right, that does require the filename, but if you
don't use an OLE object, you could just put the filepath in
the table.  This is the commonly recommended way to deal
with both pictures and sounds.

For a OLE control on a form, use the control's Verbs and
Actions.  This may be all you need:
    OLEannounce.Action = acOLEActivate

I've never tried using this stuff directly from a recordset
field.  It might require you to setup automation to your
sound player application or assign the field to an OLE
control, but I really don't know.

Marsh


Quote:
>Yes but if I understand, I need to provide the filename
>with the extension and how can I extract the filename and
>the extension from the OLE object ( wave object ) to
>provide to the function ?

>Tanks for your help

>>-----Original Message-----
>>Take a look at this:

>>http://www.mvps.org/access/api/api0011.htm



>>>I have a table with a OLE object field called annonce.

>>>When I open my table and I right click on the annonce
>>>field and execute "sound recorder document object ->
>>>play", it works fine. But I would like to do that in VB
>>>in order to read my recordset a play the wave sound in
>>>the annonce field. Is there any special fuction to do
>>>that or samples ?

>>>Many thanks in advance for your help

>>>Vincent

>>.



Sun, 09 May 2004 23:08:52 GMT  
 How to play sound coming from OLE object field in VB
    Hi
I have similar problems. I need to save a picture from an OLE field :((

I haven't find the way to do yet :( But I have an idea:
From VBA you can open table, move to your record, then copy it to clipboard
with DoMenuItem .. acCopy Then you should write external app, capable to
play sound (or to save a picture in my way) from clipboard. And call this
app from Macros, for instance...

I know this is an ugly solution... but...



Quote:
> You're right, that does require the filename, but if you
> don't use an OLE object, you could just put the filepath in
> the table.  This is the commonly recommended way to deal
> with both pictures and sounds.

> For a OLE control on a form, use the control's Verbs and
> Actions.  This may be all you need:
>     OLEannounce.Action = acOLEActivate

> I've never tried using this stuff directly from a recordset
> field.  It might require you to setup automation to your
> sound player application or assign the field to an OLE
> control, but I really don't know.

> Marsh



> >Yes but if I understand, I need to provide the filename
> >with the extension and how can I extract the filename and
> >the extension from the OLE object ( wave object ) to
> >provide to the function ?

> >Tanks for your help

> >>-----Original Message-----
> >>Take a look at this:

> >>http://www.mvps.org/access/api/api0011.htm



> >>>I have a table with a OLE object field called annonce.

> >>>When I open my table and I right click on the annonce
> >>>field and execute "sound recorder document object ->
> >>>play", it works fine. But I would like to do that in VB
> >>>in order to read my recordset a play the wave sound in
> >>>the annonce field. Is there any special fuction to do
> >>>that or samples ?

> >>>Many thanks in advance for your help

> >>>Vincent

> >>.



Mon, 10 May 2004 17:38:18 GMT  
 How to play sound coming from OLE object field in VB
OK thanks for the feedback -> it works with
OLEannounce.Action = acOLEActivate

bye

Quote:
>-----Original Message-----
>You're right, that does require the filename, but if you
>don't use an OLE object, you could just put the filepath
in
>the table.  This is the commonly recommended way to deal
>with both pictures and sounds.

>For a OLE control on a form, use the control's Verbs and
>Actions.  This may be all you need:
>    OLEannounce.Action = acOLEActivate

>I've never tried using this stuff directly from a
recordset
>field.  It might require you to setup automation to your
>sound player application or assign the field to an OLE
>control, but I really don't know.

>Marsh



>>Yes but if I understand, I need to provide the filename
>>with the extension and how can I extract the filename
and
>>the extension from the OLE object ( wave object ) to
>>provide to the function ?

>>Tanks for your help

>>>-----Original Message-----
>>>Take a look at this:

>>>http://www.mvps.org/access/api/api0011.htm



>>>>I have a table with a OLE object field called annonce.

>>>>When I open my table and I right click on the annonce
>>>>field and execute "sound recorder document object ->
>>>>play", it works fine. But I would like to do that in
VB
>>>>in order to read my recordset a play the wave sound in
>>>>the annonce field. Is there any special fuction to do
>>>>that or samples ?

>>>>Many thanks in advance for your help

>>>>Vincent

>>>.

>.



Tue, 11 May 2004 17:55:27 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Play sound from OLE field

2. Playing sound stored in OLE-field in Access 2.0 database

3. Playing sound stored in OLE-field in Access 2.0 database

4. Playing sound stored in an OLE-field in Acccess 2.0 database

5. Playing sounds even if other applications are playing sounds

6. VBA-assigning an OLE-object to an Ole-object-field

7. Sample sounds coming through sound card

8. Automatic play in VB ole object

9. Automatic play in VB ole object

10. Problem playing sound with OLE control in VB5

11. Inserting an OLE object into an OLE field!!!!

12. Linking or Embedding an OLE object into an Access OLE DataType Field using DAO

 

 
Powered by phpBB® Forum Software