Camera control using WIA

A question that has probably been asked before … can you access a USB webcam directly from the VB Macros in Base?

I have LibreOffice 5.3 which I know comes with the Access2Base extension. I would like, from within my Base form to press a button and capture a webcam image directly into my form.

I have found a nice bit of Access VBA code which allows a WIA compliant camera to be accessed by Macro and perform this very function.

The WIA camera is referenced as
DIM wDevice as WIA.Device

Unfortunately, in Base, the Macro gives an error on load … it doesn’t like the “Device” part of WIA.Device.

Anybody know if Access2Base supports accessing WIA devices programmatically and if so, how the camera is referenced?

Hello,

Seriously doubt this is possible using Access2Base. A quick look (docs here) shows nothing on this.

You are probably going to have to rely on somewhat of your own code, maybe in Python. This may start you off - Capturing a single image from my webcam in Java or Python
.

I fear you’re right. Many thanks for the pointers, I’ll see what I can come up with.
Probably easier to just use existing functionality to capture the image then and select it from the directory … :slight_smile:
Many thanks for the answer and the pointers