By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,650 Members | 812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,650 IT Pros & Developers. It's quick & easy.

VBA (MS Access) to read mpg filename (with drive\path) and direct output to WMP

P: 2
Hi everyone,

I'm a VBA (MS Access) coder. Sorry if I post this in the wrong forum - please direct me if it's.

I would like to know how to write a script to send a filename (e.g. "c:\My Documents\My Video\MyTest.MPG") to launch Window Media Player (wmp.ocx) as output.

I can see lots of these OCX files from the VBA Editor's Tools | References
- Window Media Encoder
- Window Media Encoder Agent
- Window Media Encoder Agent Locator
- Window Media Encoder Device Control
- Window Media Encoder Preview Control
- Window Media Player C:\WINDOWS\system32\wmp.ocx
- Window Media Player C:\WINDOWS\system32\msdxm.ocx
- Window Media Player Compatibility layer
- Window Media Player Launcher

But I don't know where to get these syntax and its parenthesis/parentheses

Appreciate if anyone can direct me with examples/samples would be a good start.

Thanks in advance!

Rgds, GB
Aug 27 '08 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi. Access is not perhaps the best of applications to try to use for media centre purposes. If you want to look at how it can be done you may want to look at the code written by ace programmer Dev Ashish available on The Access Web, linked here. As you will see it is not simply a matter of specifying OCXs; windows API calls are wrapped in VBA code. Use or extension of such code with other media file types will require a fair bit of experience.

Please note the copyright conditions mentioned in Dev Ashish's code; free to use as necessary, but copyright notice must be retained as is.

-Stewart
Sep 4 '08 #2

P: 2
Hi Steward, thanks so much for the direction you've given!

I've learn alot from that "Access API" page you've indicated.

It's true, VBA might not be great for media center application development but I'm using this application as a small library for my own audio/video file-keeping.

Appreciate for your time and kind efforts.

Many Thanks again Steward!

Best Regards, Lez.
Sep 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.