Is there a way to suppress dialog dialog boxes when running a macro from VBA in MS Project 2007? I'm calling the Application.FileSave() method followed by the application.PublishAllInformation() method to cycle through some projects and save/publish them, but when I call the PublishAllInformation() method, I sometimes get a message box saying that the file must be saved before it can be published (even though I just did that). Is there a way to suppress that message box, so my macro can run unattended? The save method seems to be working, the message I'm getting seems to be unnecessary. Thanks!
Application.DisplayAlerts = False will turn them off. Remember to turn them on at the end of your macro! sub tfz() Application.DisplayAlerts = False 'save and publish projects Application.DisplayAlerts = True end sub -Jack Dahlgren "tfz" wrote: > Is there a way to suppress dialog dialog boxes when running a macro from VBA > in MS Project 2007? > > I'm calling the Application.FileSave() method followed by the > application.PublishAllInformation() method to cycle through some projects and > save/publish them, but when I call the PublishAllInformation() method, I > sometimes get a message box saying that the file must be saved before it can > be published (even though I just did that). Is there a way to suppress that > message box, so my macro can run unattended? The save method seems to be > working, the message I'm getting seems to be unnecessary. > > Thanks!