Project 2003 - VBA or macro code: Task date triggers the opening of an external .exe file

I have a Ms Project file and to track some Tasks.  I would like to have that file open (every day) and if there is a Task that should START today, it will trigger a file called Task.exe that is on C:\

How could this be done (programatically)?

1. Every morning I open Ms Project File "MyBigProject"
2. On Open the .mpp file checks Task Start dates and compares to Today
3. Every specific task has an .exe file associated with THAT particular task, ex.  Task 1 has an Task1.exe file lying on C:\TaskFolder
(What these do is to go and collect information from other file systems or databases and put them in a certain order - I scripted them becasue they are recurring and associated with this project).
4. If i have on one day Task 3, Task4 and Task5 the corresponding .exe´s fire up (Task3.exe, Task4.exe, Task5.exe)

How could this be programmed in VBA code? (only complete code will get the points).

Alternatively: I could setup the tasks in Outlook Calendar and every day open up Outlook and have Outlook go into the folder and trigger the exe´s, but maybe this is more difficult since I have to tinker with the Exchange Server, which I do not have access to.

Thanks for your help.  
Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:

You can open almost any application directly by using the "Shell" comand.

For example, this will open Adobe Acrobat PDF Reader:
    Dim stAppName As String

    stAppName = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"
    Call Shell(stAppName, 1)

Now if you are talking about opening a program like MS Project and actually manipulating the program in code, this requires a different approach.

Jeffrey CoachmanMIS LiasonCommented:

Just a note:

   "(only complete code will get the points)."

Statements like this tend to deter experts, rather than attract them.
There are hundreds of 500 point questions here *without* this restriction, so it is easier to pass on your question for a less "restrictive" question.

No one wants to take a chance on posting 90% fully working code, only to have you reject it because it is not what you consider 100% "Complete Code".

Again, just FYI.

MasterandCommanderAuthor Commented:

Hi Jeff,

you´re right..... i guess I wasn´t thinking :-)

I fully appreciate any help I can get from the good folks around here.....

So, again to anyone of you interested in helping me out: How can I programatically execute an application, from within VBA code?  Even if we don´t get the "checking dates"-thingy functioning, i would like to open a program autoamitcally with vba code (i could execute the function manually....)

Greetings.  Thanks again Jeff for your observation!
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

MasterandCommanderAuthor Commented:

No, i just want to attach VBA code to some MS Project and include a link or something that opens a different program, other than MS Project.  It will open support software to the project i have.

Thanks Jeff.
Jeffrey CoachmanMIS LiasonCommented:
That is what my code will do.

You would run this from MS Project and it will open almost any "support software" that you need.

MasterandCommanderAuthor Commented:
Works.  Will use that and work from there...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.