I have a MS Access 2007 application form and would like to launch (From a button in the MS Access Form) an application created by Visual Studio 2008 and installed on the machine. The application I want to launch (run) gathers data from a web service (WCF service) and stuffs it into the Access data base. The reason to do this is to keep all funtionality of my 'application' in MS Access - well at least the operator clicks a button there instead of having to click some icon or file outside of MS Access.
I used to do this with 'shell' calls when the applications were .exe files.
I have found many suggestions on the net and even one in experts exchange but none work in VBA. One suggestion was as follows:
Public Sub New()
Dim Proc as New Process
Dim Si as New StartInfo
Si.FileName = "C:\Temp\Mytest....."
Proc.StartInfo = Si
This looks like what I am looking for but..
there is no reference to 'Process' or 'StartInfo' in VBA and I do not know what reference to add
So, Any help for me on this one using ANY method ie perhaps starting a windows batch or ??
(Geez, can't I just programatically 'click' on the stupid application reference file?)
PS. There is no guarantee the operator will have I.E. or any browser in the machine.
After building the application and testing it (this is in the computer with Visual Studio 2008)
Open Windows Explorer and open the bin\ Release folder of the current project. You can then copy that folder to any computer that has the Microsoft .NET Framework installed. Then use VBA 'shell() call to the .exe file in the release folder to start the app. This will only work if .NET Framework is installed on the target computer (running MS Access).
Also, many of the files in the Release folder are not required. I found that only
app.exe and app.exe.config were required but that may be different for your application. Just start renaming folders and files until you find the ones that will kill the app when you rename them. Then delete all those that you renamed. This is NOT a professional solution but it worked for me.
I will leave this open for any other solutions or comments for now.