Solved

Can I play an audio file with VBA running a Word 2010 document

Posted on 2011-02-18
3
549 Views
Last Modified: 2012-05-11
Is there a relatively easy way when running VBA in Word (2010 or earlier) to get the computer to play a short sound file?

If so, How?

Thanks!
     J.R. Allen
     Priddis, Alberta, Canada
0
Comment
Question by:JohnRobinAllen
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
pteranodon72 earned 250 total points
ID: 34930487
Paste all of the code from:

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

into a new standard code module. You'll then be able to call fPlayStuff to play a file. Make sure to set the second parameter to pcsASYNC (1), so that operation doesn't freeze while the sound is playing.
This code is from a Access site, but it is not Access specific.
Hope this helps,

pT72
0
 

Author Comment

by:JohnRobinAllen
ID: 34932783
I look forward to trying this out. It appears to be for Access, while I need the program for Word. However, it might work with Word too. Time will tell, and I will post the results here in the next day or so.

       j.r.
0
 

Author Closing Comment

by:JohnRobinAllen
ID: 34960945
Many thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question