
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
> >>.