I have been working on this on and off for a while and can't seem to find a solution. I am using usrtogrp.exe to add users in AD to a group and I want to pull the results into a text file or straight into a variable for VBA so I can display the results better than just leaving the command prompt open.

Here is what I have so far.

Shell Environ$("COMSPEC") & " /k " & "h:\somefolder\usrtogrp.exe " + "H:\somfolder\adinternet.txt " + "> h:\somefolder\output.txt", 1

I can get this redirect command to work for simple commands like dir, list, etc... but not for and "third party" executable. This code works, except the text file is always blank.

Any insight would be appreciated.

Thanks
Zach