Question : Using Windows Certificates with VBA

Experts,
I'm trying to read certificates in Windows with VBA, I was wondering how to go about this. Everytime I search the internet for this, it throughs me into "how to digitally sign an access database". Here are the specifics the certificates are published to windows, I would like to just use the ones that are published not read off of a smart card(DOD Common Access Card). Any help is apprecaited

Answer : Using Windows Certificates with VBA

I'm not sure ... this would depend on many different things. There are plenty of variables available (like the UserName, for example), but I'm not sure how those interact with your smartcard. Can you drop to the Command line (i.e. click Run, then enter "cmd")? If so, enter this:

set

and press the Enter key ... you'll see all the environment variables listed. You can refer to them in VBA like this:

Environ("TheNameOfTheVariable")

so on my machine, this:

Environ("UserName")

Returns "Scott"

I'm not sure, however, that your smartcard will reset these variables when a user "logs in" ... this may be the case however ...



Random Solutions  
 
programming4us programming4us