how to run an external program and put its output in access (1 Viewer)

T

tuxA

Guest
Hello!
I'm new to VBA, and I don't know at all, how to get the output of a program back...

a bit more detailed:
I've got a command line tool, that scans several files on disk and writes some info on the console.
I've tried the "Shell" function, but it returns only the program's PID.
But I need is its complete output to write it back into the database...

Alex
 

tembenite

Registered User.
Local time
Today, 06:32
Joined
Feb 10, 2005
Messages
38
You can likely trigger the program from access. As long as its a DOS prompt base program, you can put "YOURPROGRAM > textfile.txt" to capture the screen contents into a textfile. Then you could import that textfile into access.
 

modest

Registered User.
Local time
Today, 06:32
Joined
Jan 4, 2005
Messages
1,220
Just so you're clear, use tembenite's suggestion in your Shell call

Shell "blah.exe > C:\path\filename.txt"

Or you could create a bat file and call that.
 

Users who are viewing this thread

Top Bottom