Artificial intelligent assistant

Macro to run on projects I have some tasks to be be performed on each project daily. I can write a macro to automate those tasks for a project. That way I have to run that macro exclusively for each project. How do I write a macro that will run on all projects and perform those Tasks.

Create another macro that loops through your list of projects that does this:

1. Opens a project
2. Runs your macro
3. Closes and saves the project
4. Repeats steps 1-3 for each project in your list*.



*Your list can be a simple array of file names.

Here is a basic code example. There are many different ways to loop through files; search stack overflow, google, etc. to find examples.


Sub RunDailyMacroOnAllProjects()

Dim myProjects() As Variant
myProjects = Array("Test1.mpp", "Test2.mpp")

Dim prjFile As Variant
For Each prjFile In myProjects
FileOpenEx prjFile
MyDailyMacro
FileCloseEx pjSave
Next prjFile

End Sub

Sub MyDailyMacro()
' code here
End Sub

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d01b35b967f027349fa66b4ae547408d