Quote Originally Posted by raeraz
I need some urgent help. I need VBA code where when run in Micosoft Project it looks through directory on C: and opens up ms project files adds a task called "Print Financials" and closes the project

There are 100's ms project files and to do this manually is time consuming process. Can anyone help

Need some kind of loop going to look through the C: Folder for mpp files and opening them one by one and adding task

Any ideas ??????????????????????

Great help guys
Do you really want to add the task to every Project File you find? You can use the FilePicker dialogue box offered by XL (why it is not available to Project I don't understand) by defining an XL application object and then using its filepicker method (Away from MS apps right now, load XL vba help and look for "File Dialogue Picker" or some such . . you may specify multifile select which should suit your needs.

If you really want to search C:\ for all project files use the DIR command . . .would be a good case for a recursive function to traverse the folder structure.

Mal