can I use VBA to change the format of audio recorded using

P

Peter

Briefly:
I can record audio in word but I would like to use VBA to compress this to a
more managable file size e.g. 10 secs in the default format is 1.8MB and in
the compressed format it is 30kB
How can I do this compression under vba control?

More info:
By default the audio is recorded as PCM 44kHz 16 bit stero WAV which huge 10
secs = 1.5 MB

I can use compress this in Word by right clicking the audio icon > Sound
recorder document object > Edit > file > properties > playback format >
convert now > select MPEG layer 3 > 16 kBpsec 8kHz mono > Ok . and then I end
up with a 21 k file that is fine for the audio comment.

VBA to record the sound is:

Sub recordSound()
Selection.InlineShapes.AddOLEObject ClassType:="SoundRec", FileName:="", _
LinkToFile:=False, DisplayAsIcon:=False
End Sub

thanks in advance for any assistance
Peter Evans
 
G

Graham Mayor

You are not recording sound in Word, but in Sound Recorder, which doesn't
appear to have any extensions that can be programmed from Word vba.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Chip Orange

I don't know if Audacity has a COM interface, but Windows Media player does,
and I'm sure there are other packages which do.

So, if Audacity doesn't, look for a sound recorder which does so that you
can control it from VBA, cause it to store the results of a recording as
mp3, then put a link in your Word document to the new mp3 file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top